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

Re: SQL help needed

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Fri, 27 Feb 2004 09:25:08 -0800
Message-ID: <1077902671.666321@yasure>


Paul wrote:

> damorgan_at_x.washington.edu says...
>
>

>>Look at solving the problem using an in-line view. The basic code
>>structure is:
>>SELECT fld, fld, fld
>>FROM
>>   (select statement) a,
>>   (select statement) b
>>WHERE a.something = b.something
>>AND ...
>>the in-line statements aliased as 'a' and 'b' can contain all of
>>the group by and other clauses you require as can the out statement.
>>HTH

>
>
>
> I've been messing around with this for hours now, stuff like
>
> Select MAX(zz.bill)
> (
> Select count(a.pres_name) bill, a.pres_name, b.party
> from pres_hobby a, president b
> where a.pres_name = b.pres_name
> and b.party = 'DEM'
> group by a.pres_name, b.party
> order by 1 desc
> ) AS zz
> FROM zz
>
>
> And I just haven't been getting anywhere - any chance that you could
> expand on your hint?
>
>
> Paul...
>

Send me the entire problem off-line and I'll see what I can do this weekend. Today I am grading midterms and it isn't pretty. I asked my students to write FGAC from scratch and while they did very well ... trying to offer helpful hints and advice is ... lets just say challenging. ;-)

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Fri Feb 27 2004 - 11:25:08 CST

Original text of this message

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