mysql如何查询最大日期
mysql如何查询最大日期?
select * from hodelog where h_time in (select max(h_time) from hodelog group by h_hid) and h_hid=9999999 h_hid 就是需要分组的字段 也可以: MySql 分组排序取时间最大的一条记录 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