Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL help needed
Irene wrote:
> This solution is too difficult for me. I assume it can be done easier,
> because we have not discussed anything like "partition" or "row_number..."
> It has to be solved using max(count(*))
> Can anyone tell we what is wrong in my solution?
Not only that but your instructor would know you hadn't been taught that syntax.
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
-- 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 Tue Feb 24 2004 - 16:36:13 CST