--测试数据
declare @tb table(字段 int not null)
insert into @tb
select 1
union all select 11
union all select 12
union all select 11
union all select 1
union all select 3
union all select 33
union all select 1
union all select 3
--1,我想查出字段里有多少个不同的整数,分别是什么?
select distinct 字段 from @tb
--2,查出每个整数重复了多少次?
select 字段,重复次数=count(*) from @tb group by 字段