Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!agate!helios.ee.lbl.gov!nosc!cod!dberg From: dberg@cod.NOSC.MIL (David I. Berg) Newsgroups: comp.databases Subject: Re: How do you do this query? Keywords: SQL, query Message-ID: <1705@cod.NOSC.MIL> Date: 21 Nov 89 18:25:33 GMT References: <940@cirrus.stsci.edu> Organization: Naval Ocean Systems Center, San Diego Lines: 12 In article <940@cirrus.stsci.edu>, davids@stsci.EDU (David Silberberg) writes: > What I really want is a select that would get only the line with the > maximum value of C for each unique combination of A, B. select a, b, max(c) from table_name group by a, b -- David I. Berg (dberg@nosc.mil) GENISYS Information Systems, Inc., 4250 Pacific Hwy #118, San Diego, CA 92110 MILNET: dberg@nosc.mil UUCP: {akgua decvax dcdwest ucbvax}!sdcsvax!noscvax!dberg