Invalid query dude : select CASE WHEN ((pRS+pRP+pINT>=156) OR (pINT>=75)) THEN 'A' WHEN ((pRS+pRP+pINT>=131 AND pRS+pRP+pINT<156 AND pINT<75) OR (pINT >= 63 AND pINT < 75 AND pRS+pRP+pINT<131)) 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 = 7 group by gspUID, gsTeam having (sum(gsDINTS) > 0 OR sum(gsSacks) > 0 ) order by desc, Points desc, DINTS desc, Sacks desc, AvgDINT desc, DINTTDs desc