| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL help. Counting duplicate rows (Grrrr kill users!)
Don't think this would work.
Instead of providing:
123 3 456 1 i think it would provide: 123 6 456 2
but do i have an answer? hmmmm..
perhaps something like:
column col_2 noprint
select distinct col_1, col_2, count(*)
from table_name
group by col_1, col_2
/
Ian, are you sure you don't want xxx and yyy and zzz in the output? janet
John Hough wrote:
>
> select col_1, count(*)
> from table_name
> having count(*) > 1
> group by col_1
> order by count(*) desc
> /
>
> This should get you the list you desire.
>
> Hope this helps,
>
> John Hough
Received on Tue Nov 26 1996 - 00:00:00 CST
![]() |
![]() |