I have a table with the following fields
ID, date, user
now I want to return the ID of the entry with the latest date per user.
I have a solution where I query for the latest date per user and then get the id based on the date and user.
But I want to get the ID directly in one query because I think its wrong to have a JOIN query identify the ID based on date and user.
Doesn’t it defeat the whole concept of the ID? What if I have 2 people editing the same user in the same second?
Anyone knows how to do that?
Are your IDs sequential and increasing?
If so
Otherwise, nothing wrong with the join.