UPDATE Here's a sqlfiddle http://sqlfiddle.com/#!2/e0822/1/0
I have a MySQL database of apps (itunes_id), each app id has a comments field. To preserve a history, every time a comment is changed, a new row of data is added. In the query below, I just want a list of the latest entry (highest id) of every app (itunes_id).
Here are the headers of my db:
id (key and auto increment)
itunes_id
comments
date
This query is getting the latest entry for a given itunes_id. How can I make this query more efficient?
SELECT * FROM (
SELECT * FROM (
SELECT * FROM Apps
ORDER BY id DESC
) AS apps1
GROUP BY itunes_id
) AS apps2
LIMIT 0 , 25