SQL Select failed - please check syntax/table names for select count(*) from game a where a.gametype=0 and a.season=OTB group by a.season