I have table like this
ID effective_date status
1 2014-12-01 1
2 2016-11-18 0
3 2016-11-25 1
4 2017-04-21 0
5 2017-05-20 1
when status 1 = active and 0 = inactive and i have a date-search '2016-12-30'
how i can get result a date_effective with active status nearest that date-search? actually the result is
ID effective_date status
3 2016-11-25 1
thank you for your answer