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
How to create a new table by selecting rows from another table in mysql?
What is the difference between MyISAM Static and MyISAM Dynamic?
Is the syntax correct? Explain the meaning of the syntax given below: $dbc = mysqli_connect('data.aliensabductedme.com', 'owen', 'aliensrool', 'aliendatabase');
What is the default port number of mysql?
What is mysql connection limit?
Does mysql scale well?
Which software is used for mysql?
What does mysql_query return?
How do I change a procedure in mysql?
What is the insert?
What are the similarities between a function and a procedure?
How to drop an existing view in mysql?
How to convert dates to character strings?
How to change the database engine in mysql?
What is a delimiter in mysql?