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 the current root password of mysql?

490


how to display nth highest salary from a table in a mysql query? : Mysql dba

574


What is session variable in mysql?

497


What are the critical issues you have resolved in your company

1756


Is mysql from oracle?

499






Can we store files in mysql?

483


How to escape special characters in sql statements?

525


How do you restart mysql?

479


What is mysql primary key?

519


How to make a copy values from one column to another in mysql?

564


What are ddl statements in mysql?

539


What is action query?

504


How do I assign a variable in mysql?

477


Is mysql good for big data?

498


Does insert statement lock the table?

506