Invalid query : select pUID, first, last, ttAbrev, ttTecmoOrder, sum(gsPunts) as Punts, sum(gsPuntYards) as PuntYds, sum(gsPuntYards)/sum(gsPunts) as PuntAvg , 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 = 2003 AND tttID = gsTeam AND psUID = gsSeason AND gsTeam = tttID AND psUID = ttsUID AND gsWeek <= 16 AND (pos = 9) group by gspUID, gsTeam having (sum(gsPunts) > 0) order by desc, PuntAvg desc