Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> [student] BQFH
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