I have a table like this
let's say show_date table
different | date ---------------------- -2 | 2011-04-18 ---------------------- -1 | 2011-04-19 ---------------------- 4 | 2011-04-24 ---------------------- 5 | 2011-04-25 ----------------------
I want to select 2 values, the first is the first negative value, the second is the first positive value. in this example, -1 (2011-04-19) and 4 (2011-04-24) will be received
I am trying to arrange abs (other), but it gives 2 closest ones that are -1 and -2
source share