Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL - using 'distinct'
Hi, Russel,
what about
select max(customer_id), name, address from customer
group by name, address
Rolf
Russell Fray wrote:
>
> I have a table named 'customer'.
> I want to produce a mailing list from this table, and weed out
> duplicates. I was trying to use :
>
> select distinct name, address, customer_id from customer;
>
> In theory this should work, but many people have more than one
> customer_id (as they have more than one account). I want to distinct
> on everything APART from customer_id, so if addressing information is
> duplication only one instance is listed.
Received on Thu Sep 03 1998 - 04:41:14 CDT
![]() |
![]() |