Invalid query dude : select CASE WHEN (pRS+pRP>=100) THEN 'A' WHEN (pRS+pRP>=82 AND pRS+pRP<100) THEN 'B' ELSE 'C' END AS Grade, pUID, first, last, ttAbrev, ttTecmoOrder, sum(gsDINTs) as DINTs, sum(gsDINTYards) as DINTYards, sum(gsDINTYards)/sum(gsDINTs) as AvgDINT, sum(gsDINTTDs) as DINTTDs, sum(gsSacks) as Sacks, sum(gsDINTs)*3+sum(gsSacks)*2 as Points , 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 = 6 group by gspUID, gsTeam having (sum(gsDINTS) > 0 OR sum(gsSacks) > 0 ) order by desc, Points desc, Sacks desc, DINTS desc, AvgDINT desc, DINTTDs desc