I'm having some trouble building this MySql query. I need to get all the tblScoreRel.userIds in order of the sum(tblscores.points) where tblGames.weekNo < x > Y.

The tables are set up as follows

tblGames
weekNo

tblScores
points
scoreId
gameID (Links to tblGames.id)

tblScoreRel
userId
scoreId (links to tblScores.Id


Hope that makes some sense?