34,590
社区成员
发帖
与我相关
我的任务
分享
create table test(value int)
insert test
select 3 union all
select 1 union all
select 4 union all
select 1 union all
select 1 union all
select 3 union all
select 1 union all
select 2 union all
select 4
go
select top 3 value from test
group by value
order by count(value) desc
value
-----------
1
4
3
(所影响的行数为 3 行)