Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Can we store pdf files in mysql?

987


What is the difference between mysql_fetch_array() and ysql_fetch_object() ?

1024


What is sql vs mysql?

1019


How can I see mysql database?

909


Can we rollback truncate in mysql?

1018


How to write optimized query in mysql?

989


Why is mysql used?

939


How is myisam table stored?

964


What is the latest version of mysql?

989


How to set mysql variable in php?

930


What is cast in mysql?

904


Who developed mysql?

1017


What is a string in mysql?

902


How do I edit a trigger in mysql?

893


What is difference between inner vs self vs cross?

965