第1个回答 2011-08-31
查重复的数据
select a,b,c,d,e,f
from a
group by a,b,c,d,e,f
having count(*)>1
正解~!~
在oracle 中剔重查数据sql
select a, b, c, d, e, f from (select a, b, c, d, e, f, row_number() over(partition by a,b,c,d,e,f order by rowid) rn
from a) t where rn = 1;
第2个回答 2011-08-29
select max(a),max(b)等字段 from A
group by a,b,c,d
max 是聚合函数··
如果值是数字 建议换个聚合函数就行··
第3个回答 2011-08-30
select a,b,c,d,e,f
from a
group by a,b,c,d,e,f
having count(*)>1
正解~!~
第4个回答 2011-08-29
使用 degree字段分组查询,再 top 3
select top 3 degree,count(degree) as 人数
from student
group by degree
order by degree
第5个回答 2011-08-29
select a,b,c,d,e,f
from a
group by a,b,c,d,e,f
having count(*)>1本回答被提问者采纳