Total matches played by each team — DBMS OPPE Question
Total matches played by each team
00:00
A team appears in the matches table either as host_team_id or as guest_team_id. For each team, count the total number of matches it played (home and away combined). Return team_id and the total as matches_played, one row per team.
Order the result by matches_played (highest first), then by team_id.
Database schema
primary keyforeign keyarrow points to the referenced columndrag to pan