SQL exercises on soccer Database: Find the number of players played for france in the final
SQL soccer Database: Subqueries Exercise-22 with Solution
22. Write a query in SQL to find the number of players played for france in the final.
Sample table: player_in_out
Sample table: match_mast
Sample table: soccer_country
SELECT COUNT(*)+11 as "Number of players shared fields" FROM player_in_out WHERE match_no=( SELECT match_no FROM match_mast WHERE play_stage='F') AND in_out='I' AND team_id=( SELECT country_id FROM soccer_country WHERE country_name='France');
Number of players shared fields --------------------------------- 14 (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 Who was the captain of the EURO cup 2016 winning team from Portugal.
Next: Write a query in SQL to find the goalkeeper of the team Germany who didn't concede any goal in their group stage matches.
What is the difficulty level of this exercise?