Problem in listing of teams who have played in the round Eighth-final and year 2014

I have tried all the joins but still in the output i am missing some of the teams name, there are 16 teams in expected output but i am getting only 11. please help
CODE:

echo "$($PSQL "SELECT name FROM teams INNER JOIN games ON teams.team_id=games.winner_id OR teams.team_id=games.opponent_id WHERE year=2014 AND round='Eighth-Final' ORDER BY name")"
![Build A World Cup Database Project_ Build a World Cup Database _ freeCodeCamp.org - Google Chrome 16-02-2023 00_38_38|690x387](upload://bTlt9shS7Kf5JbdJY9VXO0mdctD.png)

I wonder if it is only grabbing the winners ids since there is no parentheses around the 2 joining field options?

I don’t think an inner join vs full join matters since all the games have completed fields for both winner & opponent.

tried putting them in parenthesis. but still got the same result.

echo "$($PSQL "SELECT DISTINCT(name) FROM teams INNER JOIN games ON (teams.team_id = games.winner_id OR teams.team_id = games.opponent_id) WHERE round = 'Eighth-Final' AND year = 2014")"