Write an SQL query to show matches between Teams where Pool A and Pool B teams are paired to produce outcomes like IND vs PAK.
Use competition_id = 1 and return every valid Pool A to Pool B pairing. Exclude teams outside those pools or without a valid pool assignment.
pool_a_team, pool_b_team, and matchup.matchup as <Pool A code> vs <Pool B code> and order by pool_a_team, then pool_b_team ascending.| Column | Type | Description |
|---|---|---|
| team_idPK | INT | Unique team identifier |
| team_code | VARCHAR(10) | Short team code used in matchups |
| team_name | VARCHAR(100) | Full team name |
| pool_id | INT | Assigned pool identifier |
| Column | Type | Description |
|---|---|---|
| pool_idPK | INT | Unique pool identifier |
| competition_id | INT | Competition containing the pool |
| pool_code | VARCHAR(5) | Pool label such as A or B |