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: SQL help

Re: SQL help

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 2000/03/13
Message-ID: <952966589.20625.0.pluto.d4ee154e@news.demon.nl>#1/1

select agent_name, count(*)
from agent a, agent_child ac
where ac.id = a.id
group by agent_name
having count(*) >=1
Easy

Hth,

Sybrand Bakker, Oracle DBA

ummo14 <ummo14NOumSPAM_at_hotmail.com.invalid> wrote in message news:0047c5c4.fad4e447_at_usw-ex0110-075.remarq.com...
>
> I have 3 tables
> table1:Agent
>
> column: id agent
> column: agent name
>
> table2:Agent_child
> column: id agent
> column: id child
>
> table3:Child
> column: id child
> column: name child
>
> If a Sql guru could help me It will be great for me. I want
> to select the name of the agents which have at least one
> child (if it's possible in displaying the number of child
> beside the name of the agents)
>
>
>
>
> * Sent from AltaVista http://www.altavista.com Where you can also find
related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful Received on Mon Mar 13 2000 - 00:00:00 CST

Original text of this message

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