[SQL] 查询指定Account的数据记录数不超过20条
select AccountId,COUNT(*) as cnt from tablename group by AccountId having COUNT(*)<20
having 后面只能用 COUNT(*),不能用 cnt
select AccountId,COUNT(*) as cnt from tablename group by AccountId having COUNT(*)<20
having 后面只能用 COUNT(*),不能用 cnt