如何获取此语句(返回重复项):
Select Name from Table
要归还:
Select Distinct Name, Count(Number of non-distinct Name rows)
提前致谢。
答案 0 :(得分:4)
SELECT Name, COUNT(Name) AS DistinctCount
FROM tableName
GROUP BY Name
答案 1 :(得分:1)
尝试:
选择 名称, COUNT(名称) 来自tableName GROUP BY名称