SQL exercises on soccer Database: Find the winner of EURO cup 2016
SQL soccer Database: Subqueries Exercise-2 with Solution
2. Write a query in SQL to find the winner of EURO cup 2016.
Sample table: soccer_country
Sample table: match_details
SELECT country_name as Team FROM soccer_country WHERE country_id in ( SELECT team_id FROM match_details WHERE play_stage='F' and win_lose='W');
team ---------- Portugal (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 teams played the first match of EURO cup 2016.
Next: Write a query in SQL to find the match with match no, play stage, goal scored, and the audence which was the heighest audence match.
What is the difficulty level of this exercise?