yusof_hardy Posted November 13, 2006 Share Posted November 13, 2006 I want to make a statistics display of the members countries...Member table==========idnamecountry========What is most efficient algorithm to list out the countries and corresponding number of members in decending order...for Example...United States: 53 membersCanada: 34 membersGermany: 23 membersJapan: 3 membersand so on...please help me Link to comment https://forums.phpfreaks.com/topic/27105-country-statistics/ Share on other sites More sharing options...
printf Posted November 13, 2006 Share Posted November 13, 2006 Something like...[code]SELECT country, COUNT(id) AS members FROM Member GROUP BY country ORDER BY members DESC;[/code]printf Link to comment https://forums.phpfreaks.com/topic/27105-country-statistics/#findComment-123951 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.