[SQL] 查询指定某个条件的记录数 select AccountId,COUNT(*) as cnt from AccountReturnIndex group by AccountId having COUNT(*)<20