SQL exercises on soccer Database: Find the name and country of the referee who managed the opening match
SQL soccer Database: Joins Exercise-8 with Solution
8. Write a query in SQL to find the name and country of the referee who managed the opening match.
Sample table: soccer_country
Sample table: match_mast
Sample table: referee_mast
SELECT b.referee_name, c.country_name FROM match_mast a NATURAL JOIN referee_mast b NATURAL JOIN soccer_country c WHERE match_no=1;
referee_name | country_name ---------------+-------------- Viktor Kassai | Hungary (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?