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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Complex Query

Re: Complex Query

From: Michael Hill <hillmw_at_ram.lmtas.lmco.com>
Date: Thu, 20 Mar 2003 11:41:08 -0600
Message-ID: <3E79FD34.FE33054D@ram.lmtas.lmco.com>


Or rather something like:

select fielda,fieldb,fieldc, (select count(b.fieldd) from two b group by b.fielda) from one a

Of course this doesn't work ......

Michael Hill wrote:

> I have a couple tables, i.e
>
> table one
> fielda
> fieldb
> fieldc
>
> table two
> fielda
> fieldd
>
> I need to be able to count the number of 'd's in table two and display
> along with the query from table one, something like:
>
> select fielda,fieldb,fieldc, sum(fieldd) from one a, two b where
> a.fielda=b.fielda
>
> Anyone know how I'd so this? Should the sum(fieldd) be a view?
Received on Thu Mar 20 2003 - 11:41:08 CST

Original text of this message

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