SQL exercises on soccer Database: Basic - Exercises, Practice, Solution
SQL [29 exercises with solution]
Sample Database: soccer

1. Write a query in SQL to find the number of venues for EURO cup 2016. Go to the editor
Sample table: soccer_venue
2. Write a query in SQL to find the number countries participated in the EURO cup 2016. Go to the editor
Sample table: player_mast
3. Write a query in SQL to find the number goals scored in EURO cup 2016 within normal play schedule. Go to the editor
Sample table: goal_details
4. Write a query in SQL to find the number of matches ended with a result. Go to the editor
Sample table: match_mast
5. Write a query in SQL to find the number of matches ended with draws. Go to the editor
Sample table: match_mast
6. Write a query in SQL to find the date when did Football EURO cup 2016 begin. Go to the editor
Sample table: match_mast
7. Write a query in SQL to find the number of self-goals scored in EURO cup 2016. Go to the editor
Sample table: goal_details
8. Write a query in SQL to count the number of matches ended with a results in group stage. Go to the editor
Sample table: match_mast
9. Write a query in SQL to find the number of matches got a result by penalty shootout. Go to the editor
Sample table: penalty_shootout
10. Write a query in SQL to find the number of matches were decided on penalties in the Round of 16. Go to the editor
Sample table: match_mast
11. Write a query in SQL to find the number of goal scored in every match within normal play schedule. Go to the editor
Sample table: goal_details
12. Write a query in SQL to find the match no, date of play, and goal scored for that match in which no stoppage time have been added in 1st half of play. Go to the editor
Sample table: match_mast
13. Write a query in SQL to find the number of matches ending with a goalless draw in group stage of play. Go to the editor
Sample table: match_details
14. Write a query in SQL to find the number of matches ending with only one goal win except those matches which was decided by penalty shootout. Go to the editor
Sample table: match_details
15. Write a query in SQL to find the total number of players replaced in the tournament. Go to the editor
Sample table: player_in_out
16. Write a query in SQL to find the total number of palyers replaced within normal time of play. Go to the editor
Sample table: player_in_out
17. Write a query in SQL to find the number of players replaced in the stoppage time. Go to the editor
Sample table: player_in_out
18. Write a query in SQL to find the total number of players replaced in the first half of play. Go to the editor
Sample table: player_in_out
19. Write a query in SQL to find the total number of goalless draws have there in the entire tournament. Go to the editor
Sample table: match_details
20. Write a query in SQL to fine the total number of players replaced in the extra time of play. Go to the editor
Sample table: player_in_out
21. Write a query in SQL to compute a list to show the number of substitute happened in various stage of play for the entire tournament. Go to the editor
Sample table: player_in_out
22. Write a query in SQL to find the number of shots taken in penalty shootout matches. Go to the editor
Sample table: penalty_shootout
23. Write a query in SQL to find the number of shots socred goal in penalty shootout matches. Go to the editor
Sample table: penalty_shootout
24. Write a query in SQL to find the number of shots missed or saved in penalty shootout matches. Go to the editor
Sample table: penalty_shootout
25. Write a query in SQL to prepare a list of players with number of shots they taken in penalty shootout matches. Go to the editor
Sample table: soccer_country
Sample table: penalty_shootout
Sample table: player_mast
26. Write a query in SQL to find the number of penalty shots taken by the teams. Go to the editor
Sample table: soccer_country
Sample table: penalty_shootout
27. Write a query in SQL to find the number of booking happened in each half of play within normal play schedule. Go to the editor
Sample table: player_booked
28. Write a query in SQL to find the number of booking happened in stoppage time. Go to the editor
Sample table: player_booked
29. Write a query in SQL to find the number of booking happened in extra time. Go to the editor
Sample table: player_booked
More to come .......
Practice Online
More to Come !
Query visualizations are generated using Postgres Explain Visualizer (pev)
Do not submit any solution of the above exercises at here, if you want to contribute go to the appropriate exercise page.
- New Content published on w3resource:
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- React - JavaScript Library
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework