SQL Subqueries exercises on soccer Database: Find the runners-up in Football EURO cup 2016
SQL soccer Database: Subqueries Exercise-24 with Solution
24. Write a query in SQL to find the runners-up in Football EURO cup 2016.
Sample table: match_details
Sample table: soccer_country
SELECT country_name FROM soccer_country WHERE country_id=( SELECT team_id FROM match_details WHERE play_stage='F' AND win_lose='L' AND team_id<>( SELECT country_id FROM soccer_country WHERE country_name='Portugal'));
country_name -------------- France (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 goalkeeper of the team Germany who didn't concede any goal in their group stage matches.
Next: Write a query in SQL to find the maximum penalty shots taken by the teams.
What is the difficulty level of this exercise?