Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: how many people have more than 2 cars

Re: how many people have more than 2 cars

From: Terry Dykstra <dontreply_tdykstra_at_cfol.ab.ca>
Date: Wed, 25 Apr 2001 21:20:43 GMT
Message-ID: <LcHF6.1614$Yk.200995@news1.telusplanet.net>

select person_id, count(*) from table2
group by person_id
having count(*) > 1

--
Terry Dykstra
Canadian Forest Oil Ltd.
"Ben Thomas" <bthomas_at_strider.localdomain> wrote in message
news:9c7dq1$2kip$1_at_allthetime.news.cais.net...

> I ask this question by example:
>
> {table1}:
> person_id
>
> {table2}:
> person_id
> car_id
>
> each person has one entry in {table1} and zero, one or more entries in
> {table2}.
>
> I want to know how may people have more than 2 cars.
> Seems easy but I am missing something.
>
>
> help?
> Much thanks in advance.
>
> Ben
Received on Wed Apr 25 2001 - 16:20:43 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US