SQL exercises on soccer Database: Find the goalkeeper of the team Germany who didn't concede any goal in their group stage matches
SQL soccer Database: Subqueries Exercise-23 with Solution
23. Write a query in SQL to find the goalkeeper of the team Germany who didn't concede any goal in their group stage matches.
Sample table: player_mast
Sample table: match_details
Sample table: soccer_country
SELECT player_name,jersey_no FROM player_mast WHERE player_id IN( SELECT player_gk FROM match_details WHERE play_stage='G' and team_id IN( SELECT country_id FROM soccer_country WHERE country_name='Germany'));
player_name | jersey_no ---------------+----------- Manuel Neuer | 1 (1 row)
Sample Database: soccer
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
What is the difficulty level of this exercise?