Using a self-join on the players table, list every unordered pair of players who belong to the same team (do not pair a player with themselves, and list each pair only once). Also join to teams to show the team.
Return three columns: the team's name as team_name, and the two players' names as player_1 and player_2. Pair players so that player_1's player_id is less than player_2's player_id.
Order the rows by team_name, then player_1, then player_2.
Database schema
primary keyforeign keyarrow points to the referenced columndrag to pan