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

Answer Posted / vardhan rao

This Query will delete the duplicate values in GROUP BY clause

Is This Answer Correct ?    3 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is flush privileges in mysql?

520


How do I view data in mysql workbench?

507


What are the indexes in mysql?

500


How can we encrypt and decrypt a data presented in a table using mysql?

550


What are the objects can be created using CREATE statement?

548






What is data types in mysql?

474


What is regex in mysql?

527


Where is the mysql config file?

461


What is the difference between mysql and oracle?

538


Explain timestamp?

584


State the differences between mongodb and mysql.

519


Which storage engine is best in mysql?

470


How do I rename a procedure?

472


How to set the time zone for MySQL to particular country time?

2722


How you can create a trigger in mysql?

546