如何分组后按各组最大值排序 本帖最后由 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 mysql dmp导入到mysql中 请教count复合查询 postgresql 动态读取字段内容 Mysql数据库中视图数量多的话会不会影响服务器的性能 请问环形数据同步在什么情况下使用 mysqldump导出文件不能导出到含有and字符的文件件内 lamp中安装phpmyadmin时,提示不能发现mysql模块,检查php.ini文件 Mysql中可以给用order by取出的数据赋新的id号吗? mysql5.6版本,使用mysqldump导出数据库报错,求助 求助:asSQL2.8连接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