I’m not even sure if SUM is the correct function to use. Here is what my users view looks like, which joins the users with the points and gets their team name from the team table based on the team ID:
Person TeamName Points
10 Team A 500
20 A-Team 20
30 Party People 100
40 Test! 150
50 WhooHoo 200
60 Party People 750
70 Test! 14
As you can see, there are two People with the same teamname and I want to display the results as follows grouped by the team:
TeamName Points
Team A 500
A-Team 20
Party People 850
Test! 164
WhooHoo 200
Maybe I need to start fresh… here is what I have to work with:
Users teams
user-id team-id
name teamName
points
teamid
Any help would be much appreciated!!
Thanks
1 Answer