| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> SQL help. Counting duplicate rows (Grrrr kill users!)
I know someone out there can help me with this.
My users have handily duplicated _some_ of the data in a table. I would like to know if all the data is duplicated, or some, or some might be duplicated more than once etc etc.
So how do I list out, for all the different values in col1, how many times the same value appears in col2. I.e.:
What I want to get from:
table1
col1 col2 123 xxx 123 xxx 123 xxx 123 zzz 123 zzz 123 zzz 456 xxx 456 zzz
is result
123 3 456 1
I *think* I can assume that all rows for each distinct value of col1 have been duplicated the same number of times.
Ta muchly in advance. Esp. if you email me on ianw_at_teleord.co.uk
Ian.
*----------------------------------------------*
* "Think for yourself - Question Authority" * * Dr. Timothy Leary (1920 - 1996) *Received on Tue Nov 26 1996 - 00:00:00 CST
*----------------------------------------------*
![]() |
![]() |