这里有张桌子:
+---------+--------+---------------------+----------+
| user_id | marker | date | trans_id |
+---------+--------+---------------------+----------+
| 6 | M | 2013-08-27 11:45:24 | 5 |
| 6 | MA | 2013-08-27 11:45:42 | 6 |
| 6 | A | 2013-08-27 11:45:59 | 7 |
+---------+--------+---------------------+----------+
我测试了查询:SELECT marker , MAX(date) AS maxdate
FROM mytable
WHERE user_id =6
但它不正确。您将如何编写查询?提前致谢。