SQL Subqueries exercises on soccer Database: Find the stage of match where the penalty kick number 23 had been taken
SQL soccer Database: Subqueries Exercise-30 with Solution
Write a query in SQL to find the stage of match where the penalty kick number 23 had been taken.
Sample table: match_mast
Sample table: penalty_shootout
SELECT match_no, play_stage FROM match_mast WHERE match_no= (SELECT match_no FROM penalty_shootout WHERE kick_id=23);
match_no | play_stage ----------+------------ 47 | Q (1 row)
SQL Code Editor:
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?