Database: game_injury

Question: What are the maximum, minimum and average home games each stadium held?
SQL: SELECT max(home_games) ,  min(home_games) ,  avg(home_games) FROM stadium

Question: What is the season of the game which causes the player 'Walter Samuel' to get injured?
SQL: SELECT T1.season FROM game AS T1 JOIN injury_accident AS T2 ON T1.id  =  T2.game_id WHERE T2.player  =  'Walter Samuel'

Question: What are the ids, scores, and dates of the games which caused at least two injury accidents?
SQL: SELECT T1.id ,  T1.score ,  T1.date FROM game AS T1 JOIN injury_accident AS T2 ON T2.game_id  =  T1.id GROUP BY T1.id HAVING count(*)  >=  2

Question: What are the id and name of the stadium where the most injury accidents happened?
SQL: SELECT T1.id ,  T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id  =  T2.stadium_id JOIN injury_accident AS T3 ON T2.id  =  T3.game_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1

Question: In which season and which stadium did any player have an injury of 'Foot injury' or 'Knee problem'?
SQL: SELECT T1.season ,  T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.id JOIN injury_accident AS T3 ON T1.id  =  T3.game_id WHERE T3.injury  =  'Foot injury' OR T3.injury  =  'Knee problem'

Question: How many games are free of injury accidents?
SQL: SELECT count(*) FROM game WHERE id NOT IN ( SELECT game_id FROM injury_accident )

Question: How many distinct kinds of injuries happened after season 2010?
SQL: SELECT count(DISTINCT T1.injury) FROM injury_accident AS T1 JOIN game AS T2 ON T1.game_id  =  T2.id WHERE T2.season  >  2010

Question: List the name of the stadium where both the player 'Walter Samuel' and the player 'Thiago Motta' got injured.
SQL: SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.id JOIN injury_accident AS T3 ON T1.id  =  T3.game_id WHERE T3.player  =  'Walter Samuel' INTERSECT SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.id JOIN injury_accident AS T3 ON T1.id  =  T3.game_id WHERE T3.player  =  'Thiago Motta'

Question: Show the name, average attendance, total attendance for stadiums where no accidents happened.
SQL: SELECT name ,  average_attendance ,  total_attendance FROM stadium EXCEPT SELECT T2.name ,  T2.average_attendance ,  T2.total_attendance FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.id JOIN injury_accident AS T3 ON T1.id  =  T3.game_id

Question: Which stadium name contains the substring "Bank"?
SQL: SELECT name FROM stadium WHERE name LIKE "%Bank%"

Question: How many games has each stadium held?
SQL: SELECT T1.name ,  count(*) FROM stadium AS T1 JOIN game AS T2 ON T1.id  =  T2.stadium_id GROUP BY T1.id