I'm trying to build a query to return the row with the most recent timestamp for each device in a table. Currently I have this:
SELECT (Fields)
FROM (Database)
WHERE (Conditions)
GROUP BY deviceID
HAVING MAX(timestamp);
Which simply returns the first row for each device (Or at least, that's...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.