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 offset limit?
How can I insert images into a Mysql database?
What is difference between mongodb and mysql?
How do I insert an image into mysql workbench?
Why mongodb is faster than mysql?
What is max_used_connections in mysql?
What is the insert?
How to check if value already exists in mysql database in php?
What is row level locking?
What is difference between mysql mysqli and pdo?
What is the command used to create a database using php and mysql?
How many mysql connections can handle?
What is max connections in mysql?
Is mysql better than oracle?
Does mysql case matter?