Can someone pls help me with this? Tried everything I could find.
Columns:
id, to, from, message, date, time
I have this set:
‘12’, ‘mike@hotmail.se’, ‘tina@hotmail.com’, ‘bimbam’, ‘2020-07-15’, ‘18:48:59.844557’
‘13’, ‘mike@hotmail.se’, ‘malin@hotmail.com’, ‘mitt meddelande4’, ‘2020-07-15’, ‘20:00:18.323637’
‘26’, ‘mike@hotmail.se’, ‘tina@hotmail.com’, ‘mitt meddelande4’, ‘2020-07-15’, ‘20:21:23.456423’
‘28’, ‘mike@hotmail.se’, ‘malin@hotmail.com’, ‘Hej cookie’, ‘2020-07-17’, ‘23:23:43.444444’
How can I get this from the set above?
(distinct on column: “from” and order by date DESC, time DESC)
‘28’, ‘mike@hotmail.se’, ‘malin@hotmail.com’, ‘Hej cookie’, ‘2020-07-17’, ‘23:23:43.444444’, ‘2’
‘26’, ‘mike@hotmail.se’, ‘tina@hotmail.com’, ‘mitt meddelande4’, ‘2020-07-15’, ‘20:21:23.456423’, ‘1’