MySQL Forums
Forum List  »  Newbie

Help with DISTINCT in SELECT
Posted by: aeron glemann
Date: April 14, 2005 04:18PM

Hi- Someone here turned me onto the DISTINCT keyword which works beautifully. However, I can't seem to put together what I want to do from the docs - I'm hoping someone could help me with this:

I have a big table of Countries, Cities and Coordinates (Latitude and Longitude). I can easily use "SELECT DISTINCT country" to pull out the non-duplicating country names - however how can I also get the Coordinates that correspond to those rows? "SELECT DISTINCT country, coordinates" naturally returns almost all records. What syntax am I looking for?

Any help is greatly appreciated.

Options: ReplyQuote


Subject
Written By
Posted
Help with DISTINCT in SELECT
April 14, 2005 04:18PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.