table: uuid, version, datetime
version is not unique, but the idea is to fetch only the rows with the latest datetime for a given uuid
SELECT * FROM ta
There is a better way for me, you could add a desc to group by:
desc
SELECT * FROM table WHERE uuid='bla' GROUP BY version desc
why it works is because my id's are generated and so always the latest id means the latest datetime