w3resource
Soccer Database Exercises

SQL exercises on soccer Database: Find the number of shots missed or saved in penalty shootout matches

SQL soccer Database: Exercise-24 with Solution

24. Write a query in SQL to find the number of shots missed or saved in penalty shootout matches.

Sample table: penalty_shootout


Sample Solution:

SQL Code:

SELECT COUNT(*) AS "Goal missed or saved by Penalty Kicks"
FROM penalty_shootout
WHERE score_goal='N';

Sample Output:

 Goal missed or saved by Penalty Kicks
---------------------------------------
                                     9
(1 row)

Query Visualization:

Duration:

Query visualization of Find the number of shots missed or saved in penalty shootout matches - Duration

Rows:

Query visualization of Find the number of shots missed or saved in penalty shootout matches - Rows

Cost:

Query visualization of Find the number of shots missed or saved in penalty shootout matches - Cost

Practice Online


Sample Database: soccer

soccer database relationship structure

Have another way to solve this solution? Contribute your code (and comments) through Disqus.

Previous: Write a query in SQL to find the number of shots socred goal in penalty shootout matches.
Next: Write a query in SQL to prepare a list of players with number of shots they taken in penalty shootout matches.

What is the difficulty level of this exercise?



New Content: Composer: Dependency manager for PHP, R Programming