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

Home -> Community -> Usenet -> comp.databases.theory -> Re: Simple SQL?

Re: Simple SQL?

From: Jan Hidders <hidders_at_REMOVE.THIS.win.tue.nl>
Date: 21 May 2001 22:45:48 GMT
Message-ID: <9ec5qs$l7i$1@news.tue.nl>

Vadim Tropashko wrote:
> In article <9ebtlf$hvf$1_at_news.tue.nl>, Jan Hidders says...
> >
> >No? What was wrong with Goran's solution? Or mine?
> >
> When combining aggregates from three tables you'll have to multiply counts --
> not pretty;-)

Which solution are you talking about here? In my version of Goran's solution there was no multiplication and also not in my own solution.

> Inner view solution in that case is:
>
> select sb2, sc2, sd2, b1 from
> (select sum(b2) sb2, b1 from b group by b1),
> (select sum(c2) sc2, c1 from c group by c1),
> (select sum(d2) sd2, d1 from d group by d1)
> where b1 = c1 and c1 = d1

Ah, please remind me, in what version of SQL is this allowed?

-- 
  Jan Hidders
Received on Mon May 21 2001 - 17:45:48 CDT

Original text of this message

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