Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL help needed
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...
-- plinehan y_a_h_o_o and d_o_t com C++ Builder 5 SP1, Interbase 6.0.1.6 IBX 5.04 W2K Pro Please do not top-post. "XML avoids the fundamental question of what we should do, by focusing entirely on how we should do it." quote from http://www.metatorial.comReceived on Thu Feb 26 2004 - 13:57:13 CST