MySQL Forums
Forum List  »  Newbie

Re: How to obtain most popular cities from my users table
Posted by: Stephen Counsell
Date: June 20, 2005 10:38AM

hi,
Try this:

select CITY_ID as city, count(*) as num from users group by CITY_ID;

I've not tested that statement but it should work.

What you should see is:
city num
32 3
20 1
5 1

regards
Steve

Options: ReplyQuote


Subject
Written By
Posted
Re: How to obtain most popular cities from my users table
June 20, 2005 10:38AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.