I want to select
data12 [last entry for 12-21-2014],
data11 [last entry for 12-20-2014],
data8 [last entry for 12-19-2014]
from the below table.
snapshot_datestamp data
-------------------------------
12-21-2014 08:24:21 data12
12-20-2014 19:58:49 data11
12-20-2014 19:55:36 data10
12-20-2014 19:53:59 data9
12-19-2014 21:56:23 data8
12-19-2014 21:13:16 data7
12-19-2014 11:05:45 data6
12-19-2014 11:05:07 data5
12-19-2014 10:56:13 data4
12-19-2014 10:52:21 data3
12-19-2014 10:50:43 data2
12-19-2014 10:49:30 data1
Not quite sure how to achieve this.Any pointer will be a great help.
One way is to get the latest time per day, then select the corresponding records:
Another is to use an analytic function: