ded Posted June 29, 2009 Share Posted June 29, 2009 I have a file with 3 fields: Name, Club, Points Lets say I have approx 1000 names across 10 clubs. I want to be able to show the top 3 clubs based on points. So basically i need to group all the players together under there club and then sort the club points totals. Do i make any sense? David Link to comment https://forums.phpfreaks.com/topic/164153-solved-summary-information-sorted/ Share on other sites More sharing options...
gassaz Posted June 29, 2009 Share Posted June 29, 2009 Something like this?? Select club, sum(points) from DBName group by club order by sum(points) DESC LIMIT 0,3; Link to comment https://forums.phpfreaks.com/topic/164153-solved-summary-information-sorted/#findComment-865922 Share on other sites More sharing options...
ded Posted June 29, 2009 Author Share Posted June 29, 2009 PERFECT!!!! Thank you! Link to comment https://forums.phpfreaks.com/topic/164153-solved-summary-information-sorted/#findComment-865943 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.