Invalid query : select gsTeam, pUID, first, last, face, race, sum(gsAttempts) as Attempts, sum(gsComps) as Comps, ROUND(((((sum(gsComps)/sum(gsAttempts)*5)+(sum(gsPassYards)/sum(gsAttempts)*.25)+(sum(gsPassTDs)/sum(gsAttempts)*20)+(2.375-(sum(gsINTs)/sum(gsAttempts)*25)))/6*100)-37.6),1) as tecmo_rating, ptttID, pNumber, pInjured, dod, gsUser from player_atts, tecmoplayer, game_stats where (pPC>=63 OR (pPC=56 AND pPS>=69) OR (pPC=56 AND pMS>=31)) AND pUID = pID AND pUID = gspUID AND plUID = 0 AND gslUID = plUID AND gsSeason = AND ptttID = gsTeam AND psUID = gsSeason AND gsWeek <= 16 AND pos = 0 group by gspUID, gsTeam having sum(gsAttempts) > 4* order by tecmo_rating desc limit 8