daveigh
Programmer
- Oct 9, 2003
- 105
ok guys, i have this list of multiple user id's with their corresponding site points stored in one table. and this is what i have to do:
1) show a list of "distinct" user id's,
2) calculate sum of all the points those distinct USER IDs had
3) And list them ordered by that sum
Havent come across like this before, so this is the current one i was trying to execute:
sql = "SELECT DISTINCT userid, SUM(pointsrecvd) as totalpoints FROM tblPointSystem GROUP BY userid ORDER BY SUM(pointsrecvd) DESC;"
...but i still get multiple user ids... any ideas?
______________CRYOcoustic_____________
1) show a list of "distinct" user id's,
2) calculate sum of all the points those distinct USER IDs had
3) And list them ordered by that sum
Havent come across like this before, so this is the current one i was trying to execute:
sql = "SELECT DISTINCT userid, SUM(pointsrecvd) as totalpoints FROM tblPointSystem GROUP BY userid ORDER BY SUM(pointsrecvd) DESC;"
...but i still get multiple user ids... any ideas?
______________CRYOcoustic_____________