Invalid query : select pos, pUID, first, last, ttAbrev, ttTecmoOrder, sum(gsRushes) as Rushes, sum(gsRushYards) as RushYards, sum(gsRushYards)/sum(gsRushes) as AvgRush, sum(gsRushTDs) as RushTDs, sum(gsRushYards)+LEAST(300, sum(gsReceptionYards)) as PG, CASE WHEN (pos=1 AND (pMS>=63 OR (pMS=56 AND pHP>=88))) THEN 'A' WHEN (pos=1 AND (pMS=50 OR (pMS=56 AND pHP < 88) OR (pMS=44 AND pHP>=88))) THEN 'B' WHEN (pos = 1 AND ((pMS=44 AND pHP<88) OR pMS < 44)) THEN 'C' ELSE 'n/a' END AS Grade , 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 (pPos = 0 OR pPos = 1 OR pPos = 2 OR pPos = 3) group by gspUID, gsTeam having sum(gsRushes) > 0 order by asc, RushYards desc, AvgRush desc, RushTDs desc