SQL exercises on soccer Database: Find the stadium hosted the final match of EURO cup 2016 along with the capacity, and audance for that match
SQL soccer Database: Joins Exercise-13 with Solution
13. Write a query in SQL to find the stadium hosted the final match of EURO cup 2016 along with the capacity, and audance for that match.
Sample table: soccer_venue
Sample table: soccer_city
Sample table: match_mast
SELECT a.venue_name, b.city, a.aud_capacity, c.audence FROM soccer_venue a JOIN soccer_city b ON a.city_id=b.city_id JOIN match_mast c ON a.venue_id=c.venue_id WHERE play_stage=\'F\';
venue_name | city | aud_capacity | audence -----------------+-------------+--------------+--------- Stade de France | Saint-Denis | 80100 | 75868 (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 city where the opening match of EURO cup 2016 played.
Next: Write a query in SQL to compute a report that contain the number of matches played in each venue along with their city.
What is the difficulty level of this exercise?