SELECT country,city
FROM customers
GROUP BY country
ORDER BY city DESC
Answers were Sorted based on User's Feedback
Answer / prajakta
this is right coz here order by clause is at the end of
query...
Is This Answer Correct ? | 21 Yes | 3 No |
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 |
Answer / rod sohrabi
It will only return 1 row per country and will display only the city that is reverse alphabetical order
Is This Answer Correct ? | 3 Yes | 2 No |
Answer / vardhan rao
This Query will delete the duplicate values in GROUP BY clause
Is This Answer Correct ? | 3 Yes | 5 No |
what is mySQL. Is there any specific qualification required to do this course ? What is the scope in India after doing mySQL
What is mysqli_num?
How to create triggers in MySQL?
How to rename an existing column in a table?
What is difference between mysql and mysql workbench?
What is int unsigned?
Can you tell the reasons for selecting lamp(linux, apache, mysql, php) instead of any other combination of software programs, servers, and operating system?
How do I truncate all tables in mysql?
Consider you have the following three tables which have to be linked together.
Is mysql open source?
What is bdb (berkeleydb)?
What is default password for mysql?