我想按 id 分组并按开始时间(最新行)排序。
数据:
begintime id type created_at
2012-12-13 01:00:00 1 type1 2012-12-01 11:39:47
2012-12-13 00:00:00 1 type2 2012-12-02 00:29:10
2012-12-13 03:00:00 2 type3 2012-12-05 00:20:43
2012-12-13 02:00:00 2 type2 2012-12-06 11:31:41
2012-12-13 00:00:00 2 type1 2012-12-07 00:58:11
我想得到:
begintime id type created_at
2012-12-13 01:00:00 1 type1 2012-12-01 11:39:47
2012-12-13 03:00:00 2 type3 2012-12-05 00:20:43
我怎么才能得到它?