My Table has several rows in each day.
Now I want to fetch the latest row for each date.
The number of rows for each day is not unpredictable.
id, recordTime
1, 2011-11-01 07:12:00
2, 2011-11-01 12:00:00
3, 2011-11-01 21:22:00 // fetch
4, 2018-11-02 08:00:13
5, 2018-11-02 12:00:13
6, 2018-11-02 14:00:13
7, 2018-11-02 16:00:13 //fetch
8, 2018-11-03 22:03:00 //fetch
9, 2018-11-04 12:23:00
10,2018-11-04 21:03:00 //fetch
My plan is like this...
1.) Order by recordTime
2.) group by the day of recordTime
and get latest row????(but how???)
How do I do this????