标签:style class blog code java http
SELECT A.* FROM digital_asset A, (SELECT name, max(last_updated) max_day FROM digital_asset GROUP BY name) B WHERE A.name = B.name AND A.last_updated = B.max_day
SELECT A . * FROM bbs_threads A, ( SELECT digest, max( dateline ) max_dateline FROM bbs_threads WHERE fid =51 AND digest >0 AND displayorder >=0 GROUP BY digest ORDER BY max_dateline )B WHERE A.digest = B.digest AND A.dateline = B.max_dateline LIMIT 0 , 20
MySql 分组排序取时间最大的一条记录,布布扣,bubuko.com
标签:style class blog code java http
原文地址:http://www.cnblogs.com/afei-happy/p/3783520.html