如何分组后按各组最大值排序 本帖最后由 ACMAIN_CHM 于 2012-11-12 23:00:22 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 order by topic_id,post_date desc select a.* from 数据库表 a,(select topic_id,max(post_date) as k from 数据库表 group by topic_id) b where a.topic_id=b.topic_id order by b.k desc,b.topic_id select *from 数据库表 aorder by (select max(post_date from) 数据库表 where topic_id=a.topic_id ) desc,topic_id 请问大家关于mysql5中查询的问题 linux下的mysql启动不了 为什么MySQL的timestamp类型的字段,默认为CURRENT_TIMESTAMP的,会比实际服务器时间少8个小时啊 我有一个城市的数据表,里面包括中文名和英文名! MySQL 5.0修改max_allowed_packet的问题 一个 order by 的问题 MySQL-Front的设置问题 mysql c API 如何在VC中使用SQL mysql 时间触发器 求拼接树的SQL及生成json方法 求助mysql数据恢复
from 数据库表 a,(select topic_id,max(post_date) as k from 数据库表 group by topic_id) b
where a.topic_id=b.topic_id
order by b.k desc,b.topic_id
from 数据库表 a
order by (select max(post_date from) 数据库表 where topic_id=a.topic_id ) desc,topic_id