I have a table with some columns, 2 of which are eventTime and gameId.
gameId however is not the primary key and is not unique for each
record, that is id. I want to get returned all the unique gameId's the
biggest eventTime for that gameId. Then order then by the returned
eventTime. I have tried numerous possibilities but cannot seem to get
this to work. If anybody knows please can you reply
Something like this (what I call the Strawberry query) perhaps:
SELECT g1. *
FROM `games` g1
LEFT JOIN `games` g2 ON g1.`gameId` = g2.`gameId` AND g1.`eventTime` <
g2.`eventTime`
WHERE g2.`eventTime` IS NULL
ORDER BY g1.`eventTime`