SELECT count(*) FROM Stack WHERE Id = 33478 GROUP BY SID
Output:
(No column name)
1
4
结果;有两排。我该如何归还2? (行数)
有以下任何方式:
Select COUNT(SELECT count(*) FROM Stack WHERE ContentId = 33478 GROUP BY SID) ....
感谢。
答案 0 :(得分:4)
您应该查看DISTINCT
关键字:
SELECT COUNT(DISTINCT SID) FROM Stack WHERE Id = 33478