Mysql将数据分组后取出时间最近的数据

select * from AccountMark as b where not exists(select 1 from AccountMark where AccountId= b.AccountId and b.CreateTime<CreateTime )mysql 谢谢这位大神的解答,这样查出来的数据是正确的并且避免了查询子句的问题。可是若是我要在这里面统计出每个AccountId有多少
相关文章
相关标签/搜索