SELECT A , B , COUNT(Id) AS '数量' FROM dbo.[Table] GROUP BY A , B 转载于:https://www.cnblogs.com/mtsl/p/4232508.html