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 -> [student] BQFH

[student] BQFH

From: Oliver White <ojw_at_iinet.net.au>
Date: Mon, 26 Oct 1998 16:09:55 GMT
Message-ID: <3634948b.39782966@news.m.iinet.net.au>

I have been given much grief by this query, obviously the syntax is completely wrong, but I have tried putting the MAX function in all sorts of places. In this case I get a "SQL command not properly ended" error, but in other configurations the concentric grouping functions are not allowed. How would I find the maximum of the subtotals, what would be the syntax?

SELECT F.FILM_NAME, SUM(S.CONC_SEATS_SOLD) + SUM(S.ORD_SEATS_SOLD) SUBTOT
FROM FILM F, SCREENING S
WHERE S.FILM_NO = F.FILM_NO
ORDER BY S.FILM_NO
HAVING SUBTOT = MAX(SUBTOT);
--

On the smeeter.
MHM 22x9
--
Received on Mon Oct 26 1998 - 10:09:55 CST

Original text of this message

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