On Tue, 10 Dec 2002 12:22:16 -0500, Brian Mowers wrote: >Want distinct Fname,Lname From Rides Where GroupNumber=8 > However, I want to include the RideMiles as part of this select. >If I put the RideMiles into the select (below) it breaks the discinctness that I am looking for. Is this possible? > >This is what I want: >RiderNum Fname Lname RideMiles >--------------- ----------- ------------ -------------- > 1 Brian Mowers 32. > 2 Cathy Mowers 32.
Try: SELECT RiderNum, FName, LName, MAX (RideMiles) as TotalMiles FROM Rides WHERE GroupNumber=8 GROUP BY RiderNum, FName, LName (unless you want SUM, but from you example, it looks like you wanted MAX) Bill Bill ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: INTRO rbase-l ================================================ TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: UNSUBSCRIBE rbase-l ================================================ TO SEARCH ARCHIVES: http://www.mail-archive.com/rbase-l%40sonetmail.com/
