Filed1 Filed2 Filed3
a1 b1 c1
a1 b2 c2
a2 b3 c1
a2 b1 c2
a3 b3 c1
a3 b1 c2
想查出filed1中有相同filed3的数据 三个字段都得SHOW出来
比如:Filed3.c1 中有哪几个Filed1有
------解决方案--------------------
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个数及数据展示