There are comments table:
id | cid | time | text ------------------------- 1 | 9 | 1000 | текст 2 | 9 | 1001 | текст2 3 | 10 | 1000 | текст3 4 | 10 | 1003 | текст4 5 | 11 | 1088 | текст5 As a result, you need to get only the text and cid fields for MAX(time) for each cid (id: 2, 4, 5)
Example result:
cid | text ------------ 9 | текст2 10 | текст4 11 | текст5 How to make the appropriate SELECT query?
MAX(time)values for the samecid? - Mark Shevchenko