For an example, I would like to select id with max date group by category, the result is: 7, 2, 6
id category date 1 a 2013-01-01 2 b 2
Try this one:
SELECT t1.* FROM Table1 t1 JOIN ( SELECT category, MAX(date) AS MAXDATE FROM Table1 GROUP BY category ) t2 ON T1.category = t2.category AND t1.date = t2.MAXDATE