I have a table with non-unique value and date on it
How to select values by the given tuple with the latest datetime?
given tuple (foo, bar)
result should be
[(1, foo, 2024-05-29 03:38:12), (6, bar, 2024-05-29 08:36:14)]
id value date
1 foo 2024-05-29 03:38:12*
2 foo 2024-05-27 12:37:06
3 xxx 2024-05-29 08:17:24
4 foo 2024-05-27 13:45:03
5 bar 2024-05-28 12:56:04
6 bar 2024-05-29 08:36:14*
I tried with the MAX(date) and GROUP BY, but seems my mysql level not that good to get a result((
Thank you