Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Complex Query
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
![]() |
![]() |