Skip to content
Advertisement

find only the duplicate values in listagg

I am having some duplicate rows in my table. I wanted to find those duplicates.

enter image description here

After i have done listagg on the column rp_num my table will have duplicate value like this :

enter image description here

I wanted to select only those duplicate values in rp_num_group (after the listagg on rp_num column). I tried using count(*) for the listagg but it doesnt work.

I wanted to select only those values mentioned below : enter image description here

Advertisement

Answer

You can use the analytical function as follows:

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement