我有那张桌子:
论坛:
_____________________________________________________________
|match_static_id| comment | timpstamp | user_id |
|_______________|___________|______________________|__________|
| 1 | Hi | 2013-07-10 12:15:03 | 2 |
| 1 | Hello | 2013-07-09 12:14:44 | 1 |
|_______________|___________|______________________|__________|
工作查询是:
select forum.match_static_id,
count(forum.match_static_id) 'comment_no'
Group By forum.match_static_id
但是,如果我想拥有:
select forum.match_static_id,
count(forum.match_static_id) 'comment_no',
forum.timestamp
Group By forum.match_static_id
它将给出与前一个查询相同的结果,但每条记录都有一个时间戳值
我希望这个值是最近的时间戳,可以这样做吗?