SELECT country,city
FROM customers
GROUP BY country
ORDER BY city DESC

Answer Posted / rod sohrabi

It will only return 1 row per country and will display only the city that is reverse alphabetical order

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In how many ways we can retrieve the data in the result set of MySQL using PHP? What is the difference between mysql_fetch_object and mysql_fetch_array ?

547


What is view? How can you create and drop view in mysql?

493


How do I copy a table in mysql?

495


How much does mysql enterprise cost?

501


How to drop an existing index in mysql?

561






Is mysql free for enterprise?

504


How to delete a trigger in mysql?

503


Why we use mongodb instead of mysql?

494


Is oracle mysql free?

488


how to Return total number of rows.

553


What is dblink?

492


How do I find the database name in mysql?

525


In how many ways we can retrieve data in the result set of mysql using php?

626


How do I find the size of a mysql database?

488


What sql does mysql use?

498