加个排序不就好了吗? select field3,field1 from table order by field3,field1
select field3,to_char(wmsys.wm_concat(field1)) field1 from table group by field3 order by field3 结果为 C1 a1,a2,a3 C2 a1,a2,a3
select * from table_name where filed3='c1';--这太简单了吧 --下面这个? select filed1,filed2,filed3,count(filed1) over(partition by filed3) cnt from table_name --查看根据filed3分组的filed1个数及数据展示
select field3,field1 from table order by field3,field1
结果为
C1 a1,a2,a3
C2 a1,a2,a3
select * from table_name where filed3='c1';--这太简单了吧
--下面这个?
select filed1,filed2,filed3,count(filed1) over(partition by filed3) cnt from table_name
--查看根据filed3分组的filed1个数及数据展示
高手,想問下,我可以把只有一個的去掉不顯示不
C1 a1,a2,a3
C2 a1,a2,a3
C3 a1
把C3不顯示出來
from table
group by field3
having count(1)>1
order by field3