Teams table with itself, aliasing one instance as T1 (representing the home team) and the other as T2 (representing the away team).WHERE clause to filter out the rows where T1.team_name is equal to T2.team_name, as a team cannot play against itself.T1.team_name as home_team and T2.team_name as away_team to represent the match pairing.
erDiagram
Teams {
varchar team_name PK
}