From: Bhavin Shah <bhavinsh@aludra.usc.edu>
Subject: selecting max row out of many
Date: 2000/08/08
Message-ID: <Pine.GSO.4.21.0008081928050.26663-100000@aludra.usc.edu>#1/1
Sender: bhavinsh@aludra.usc.edu
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: abuse@usc.edu
X-Trace: usc.edu 965788535 20679 128.125.253.184 (9 Aug 2000 02:35:35 GMT)
Organization: University of Southern California
Mime-Version: 1.0
NNTP-Posting-Date: 9 Aug 2000 02:35:35 GMT
Newsgroups: comp.databases.oracle.misc,comp.databases.oracle.misc


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.



