Invalid query dude : 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(gsReceptionYards) as ReceptionYards, sum(gsReceptionTDs) as ReceptionTDs,
CASE WHEN (pos=1 AND pMS>=63) THEN 'A'
WHEN (pos=1 AND pMS=56) THEN 'B'
WHEN (pos=1 AND (pMS=50 OR pMS=44)) THEN 'C'
WHEN (pos=1 AND pMS<=38) THEN 'D' 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 = 2010 AND tttID = gsTeam AND psUID = gsSeason AND gsTeam = tttID AND psUID = ttsUID AND gsWeek <= 20 AND (pPos = 0 OR pPos = 1 OR pPos = 2 OR pPos = 3) group by gspUID, gsTeam having sum(gsRushes) > 0 order by desc, RushYards desc, RushTDs desc