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
Can we store pdf files in mysql?
What is the difference between mysql_fetch_array() and ysql_fetch_object() ?
What is sql vs mysql?
How can I see mysql database?
Can we rollback truncate in mysql?
How to write optimized query in mysql?
Why is mysql used?
How is myisam table stored?
What is the latest version of mysql?
How to set mysql variable in php?
What is cast in mysql?
Who developed mysql?
What is a string in mysql?
How do I edit a trigger in mysql?
What is difference between inner vs self vs cross?