Invalid query : select pID, first, last, sum(gsXPAttempts) as XPAttempts, sum(gsXPMade) as XPMade, sum(gsXPMade)/sum(gsXPAttempts)*100 as XPperc, sum(gsFGAttempts) as FGAttempts, sum(gsFGMade) as FGMade, sum(gsFGMade)/sum(gsFGAttempts)*100 as FGperc, sum(gsFGMade)*3+sum(gsXPMade) as Points , tID, city, tname from tecmoplayer, game_stats, tecmoteam where gslUID = 1 AND pID = gspUID AND tID = gsTeam AND gsSeason = AND gPlayoff = 1 AND pos = 8 AND (gsFGMade > 0 OR gsXPMade > 0) group by pID order by Points desc