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: Tue, 25 Mar 2003 11:52:26 -0600
Message-ID: <3E80975A.8B87488A@ram.lmtas.lmco.com>


Tims, thanks... Mike

Tim X wrote:

> >>>>> "Michael" == Michael Hill <hillmw_at_ram.lmtas.lmco.com> writes:
>
> Michael> I have a couple tables, i.e table one fielda fieldb fieldc
>
> Michael> table two fielda fieldd
>
> Michael> I need to be able to count the number of 'd's in table two
> Michael> and display along with the query from table one, something
> Michael> like:
>
> Michael> select fielda,fieldb,fieldc, sum(fieldd) from one a, two b
> Michael> where a.fielda=b.fielda
>
> Michael> Anyone know how I'd so this? Should the sum(fieldd) be a
> Michael> view?
>
> select fielda, fieldb, fieldc, count(fieldd)
> from tabel1 a, table2 b
> where a.fielda = b.fielda
> group by fielda, fieldb, fieldc;
>
> --
> Tim Cross
> The e-mail address on this message is FALSE (obviously!). My real e-mail is
> to a company in Australia called rapttech and my login is tcross - if you
> really need to send mail, you should be able to work it out!
Received on Tue Mar 25 2003 - 11:52:26 CST

Original text of this message

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