SQL exercises on soccer Database: Find the player Who was the captain of the EURO cup 2016 winning team from Portugal
SQL soccer Database: Subqueries Exercise-21 with Solution
21. Write a query in SQL to find the player Who was the captain of the EURO cup 2016 winning team from Portugal.
Sample table: player_mast
Sample table: match_captain
Sample table: match_details
SELECT player_name FROM player_mast WHERE player_id IN ( SELECT player_captain FROM match_captain WHERE team_id=( SELECT team_id FROM match_details WHERE play_stage='F' AND win_lose='W'));
player_name -------------------- Cristiano Ronaldo (1 row)
Sample Database: soccer
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Previous: Write a query in SQL to find the player with other infromation Who scored the last goal in the 2nd semi final i.e. 50th match in EURO cub 2016.
Next: Write a query in SQL to find the number of players played for france in the final.
What is the difficulty level of this exercise?