SQL Select failed - please check syntax/table names for select distinct g.gameid,g.hometeamid,g.visitorteamid,g.rainout, t.teamname, g.postgame_notes from game g,boxscore b , team t where (g.gamedate = '2015-06-07') and g.gameid = b.gameid and g.hometeamid = t.teamid and (g.rainout = 'N' or rainout='n') and t.teamname <> 'BYE'