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 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 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 = 2024 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) AND gsRushes > 0 group by gspUID, gsTeam order by asc, RushYards desc, AvgRush desc, RushTDs desc