I need to retrieve a series of data for each id from a table. The data or the row value for the column need to be such that it is the second most recent value. For instance, I have Table- estimate_record as following
Id value last_updated
1 210 10/2018
1 205 11/2018
1 215 12/2018 -- current
I need to get the 205 for that particular id =1
I used Max(value)
, but it's getting 215
which is not right.