I have a table that stores filenames for some files, but each file can be part of a "group", is there a way to make a distinct select so that i get the latest updated record from each of the groups? taking into consideration that even on the same groups the filename is different.
EXAMPLE
filename group updated_at
asdwe.pdf 1 2020-08-21 19:38:08
123we.pdf 2 2020-08-21 17:38:08
a34we.pdf 2 2020-08-21 19:38:08
34243.pdf 3 2020-08-21 19:38:08
desired result
asdwe.pdf 1 2020-08-21 19:38:08
123we.pdf 2 2020-08-21 17:38:08
34243.pdf 3 2020-08-21 19:38:08