I've been trying to gather some data from a MySQL database for a while now.
The problem is that I want to group the data by objectid
while getting only the newest data (Descending).
Everytime I try it, I either get an error, or it doesnt Descend.
My query at the moment is:
SELECT * FROM 'table' GROUP BY 'objectid' DESC
I've tried ordering by id
or timestamp
, but with an ascended result.
My question is similar to: http://stackoverflow.com/questions/7306082/mysql-using-group-by-and-desc
However the answers provided there didn't solve my problem.
Thanks in advance!