Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> SQL Question using MAX()
I have a table which has multiple records for a given area, with
multiple areas. I want to know the area that has the maximum total
length. Example data:
area length ---- ------ 7511 42.1 7511 22.6 7512 12.5 7512 10.1 7512 11.3 7513 19.2
Result should be:
area sum(length) ----- ----------- 7511 64.7
I tried using the max() function, but when I do that I can only get back the maximum value, but I don't know what area that value goes to. Anyone have any ideas?
Thanks,
Dave
Received on Thu Nov 19 1998 - 12:00:21 CST