Invalid query dude : select pPos, pUID, first, last, ttAbrev, ttTecmoOrder, sum(gsKRAttempts) as KRAttempts, sum(gsKRYards) as KRYards, sum(gsKRYards)/sum(gsKRAttempts) as AvgKR, sum(gsKRTDs) as KRTDs, sum(gsPRAttempts) as PRAttempts, sum(gsPRYards) as PRYards, sum(gsPRYards)/sum(gsPRAttempts) as AvgPR, sum(gsPRTDs) as PRTDs , tttID, pNumber, COUNT(DISTINCT(gsgUID)) as gp, pInjured from player_atts, tecmoplayer, standings, game_stats where pUID = pID AND pttUID = ttTecmoOrder AND pUID = gspUID AND plUID = 1 AND gslUID = plUID AND ttlUID = gslUID AND gsSeason = 2010 AND tttID = gsTeam AND psUID = gsSeason AND gsTeam = tttID AND psUID = ttsUID AND gsWeek <= 20 AND (pos = 1 OR pos = 2 OR pos = 3) group by gspUID, gsTeam having (sum(gsKRAttempts) > 0 OR sum(gsPRAttempts) > 0) order by desc, KRYards desc, AvgKR desc, KRTDs desc, PRYards desc, AvgPR desc, PRTDs desc