Thread: Country count
View Single Post
Old 12-01-2012, 12:55 PM   PM User | #3
Radeom
New Coder

 
Join Date: May 2012
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Radeom is an unknown quantity at this point
PHP Code:
SELECT countrycount(distinct name) AS theCount FROM names GROUP BY country ORDER BY theCount DESC 
result is:

Code:
Sweden 4
Denmark 3
Germany 1
because no id
it does not work:
PHP Code:
SELECT countrycount(distinct name and id) AS theCount FROM names GROUP BY country ORDER BY theCount DESC 
Radeom is offline   Reply With Quote