Invalid query : select pID, first, last, sum(gsReceptions) as Receptions, sum(gsReceptionYards) as ReceptionYards, sum(gsReceptionYards)/sum(gsReceptions) as AvgRec, sum(gsReceptionTDs) as ReceptionTDs , tID, city, tname from tecmoplayer, game_stats, tecmoteam where pID = gspUID AND tID = gsTeam AND gsSeason = AND gslUID = 1 AND gPlayoff = 0 AND pos = 2 AND gsReceptions > 0 group by pID, gsSeason order by gsReceptionTDs desc, ReceptionYards desc