Hi All,
I need some help in Grouping the below table
with temp_tab as (
SELECT 1as ID ,'ABC' as name from dual union all
SELECT 1,'XYZ' from dual union all
SELECT 2,'123' from dual union all
SELECT 2,'456' from dual union all
SELECT 11,'ABC' from dual union all
SELECT 11,'XYZ' from dual union all
SELECT 22,'123' from dual )
SELECT * FROM temp_tab;
Here ID and 1 and 11 have same number of rows with same value but 2 and 22 has only 1 row in match
Final output has to be
ID NAME
1 'ABC'
1 'XYZ'
2 '123'
2 '456'
22 '123'
Since 1 and 11 have the same number of rows and same value I want them to be display only the first set
can some one help me??