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
What are the player name, number of matches, and information source for players who do not suffer from injury of 'Knee problem'?
assistant
SELECT player , number_of_matches , SOURCE FROM injury_accident WHERE injury != 'Knee problem'
human
How many distinct kinds of injuries happened after season 2010?
assistant
SELECT count(DISTINCT T1.injury) FROM injury_accident AS T1 JOIN game AS T2 ON T1.game_id = T2.id WHERE T2.season > 2010
human
How many games are free of injury accidents?
assistant
SELECT count(*) FROM game WHERE id NOT IN ( SELECT game_id FROM injury_accident )
human
What are the ids, scores, and dates of the games which caused at least two injury accidents?
assistant
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
human
List the dates of games by the home team name in descending order.
assistant
SELECT Date FROM game ORDER BY home_team DESC
human
For each injury accident, find the date of the game and the name of the injured player in the game, and sort the results in descending order of game season.
assistant
SELECT T1.date , T2.player FROM game AS T1 JOIN injury_accident AS T2 ON T1.id = T2.game_id ORDER BY T1.season DESC ;