human
Schema:
stadium (id, name, Home_Games, Average_Attendance, Total_Attendance, Capacity_Percentage)
game (stadium_id, id, Season, Date, Home_team, Away_team, Score, Competition)
injury_accident (game_id, id, Player, Injury, Number_of_matches, Source)
Please answer with SQL.
assistant
Sure, I understand.
human
Hi! May i ask how many total games were played?
assistant
SELECT COUNT( * ) FROM game;
human
Okay. How many games were without injuries?
assistant
SELECT COUNT( * ) FROM game WHERE id NOT IN ( SELECT game_id FROM injury_accident );
human
How many were with injuries?
assistant
SELECT COUNT( * ) FROM game WHERE id IN ( SELECT game_id FROM injury_accident );
human
Okay that's fine. Do you know the stadium ID for games without injuries?
assistant
SELECT stadium_id FROM game WHERE id NOT IN ( SELECT game_id FROM injury_accident ) ;