Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> selecting max row out of many
Hi,
How do you select one row with the highest column C out of many possible rows in sql?
Ex: Table X
A B C
abc 1 8 def 1 9 ghi 2 1
SELECT * FROM X WHERE B='1' will get me the first two rows, but how do I filter it out using column C, like taking the row with the highest C? I tried using max, but I couldn't get it to work.
Thanks in advance. Received on Tue Aug 08 2000 - 00:00:00 CDT