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 default port for mysql and how it can change?
How many columns can be used for creating Index?
How many tables we can create in mysql database?
How much does mysql enterprise cost?
change column name and make a unique column so we get no dupes.
Where is mysql password stored?
How to filter data from a mysql database table with php?
Is mysql owned by oracle?
What is sql in mysql?
How can you change the name of any existing table by using the sql statement?
What is the command used to create a database using php and mysql?
What are the difference between mongodb and mysql?
How to define numeric 9(3) in db2 table without decimal point??
can you tell what are the different set operations available in mysql? : Mysql dba
How does mysql store binary data?