SELECT country,city
FROM customers
GROUP BY country
ORDER BY city DESC
Answer Posted / manoj pandey
This is wrong because there is no aggregate function in the
query when a group by clause is used.
The above query could be like:
1. SELECT country, count(city)
2. FROM customers
3. GROUP BY country
4. ORDER BY country DESC
* Correction at line 1 & 4.
Is This Answer Correct ? | 12 Yes | 9 No |
Post New Answer View All Answers
What is the purpose of -> in the mysql terminal?
What is flush privileges in mysql?
How do I edit a database in mysql workbench?
What is a storage engine?
What is the difference between a heap table and temporary table?
What is root password?
What are the reasons for selecting lamp (linux, apache, mysql, php) instead of combination of other software programs, servers and operating systems?
Difference between CHAR and VARCHAR?
What is mysql gpl?
How do I kill a mysql query?
What does mysqli_fetch_assoc do?
What is cursor in mysql?
What is the phantom problem?
What is an index? How can an index be declared in mysql?
Is pdo more secure than mysqli?