MySql 先排序后分组实现方法

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

select * from weixin_sub_log where id in (select max(id) from weixin_sub_log where `sub_time` BETWEEN 1558454400 AND 1558540799 AND `accid`=1 group by openid)

 

转载于:https://my.oschina.net/colinadmin/blog/3053614

你可能感兴趣的:(MySql 先排序后分组实现方法)