SELECT A , B , COUNT(Id) AS ‘数量‘ FROM dbo.[Table] GROUP BY A , B
Sql在Group by的select中包含多列
原文:http://www.cnblogs.com/mtsl/p/4232508.html