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 ids, scores, and dates of the games which caused at most 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
How many competitions in this table? | Did you mean the number of different competitions? | Yes.
assistant
SELECT COUNT( distinct Competition ) FROM game ;