[SQL] 查询指定某个条件的记录数

select AccountId,COUNT(*) as cnt from AccountReturnIndex 
group by AccountId
having COUNT(*)<20

 

posted @ 2017-07-13 09:41  Sunshine168  阅读(1322)  评论(0编辑  收藏  举报