Group By 与 Count

select UserID,COUNT(0) From [Order] a Group By UserID

UserID   (无列名)
1             5    
2             4
4             2
8             3
11           1
14           1
16           1
17           2
18           1
97           1

原文地址:https://www.cnblogs.com/blackice/p/3240244.html