w3resource
SQL exercises

SQL exercises on soccer Database: Find the number of shots taken in penalty shootout matches

SQL soccer Database: Exercise-22 with Solution

22. Write a query in SQL to find the number of shots taken in penalty shootout matches.

Sample table: penalty_shootout


Sample Solution:

SELECT COUNT(*) AS "Number of Penalty Kicks"
FROM penalty_shootout;

Sample Output:

 Number of Penalty Kicks
-------------------------
                      37
(1 row)

Query Visualization:

Duration:

Query visualization of Find the number of shots taken in penalty shootout matches - Duration

Rows:

Query visualization of Find the number of shots taken in penalty shootout matches - Rows

Cost:

Query visualization of Find the number of shots taken 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 compute a list to show the number of substitute happened in various stage of play for the entire tournament.
Next: Write a query in SQL to find the number of shots socred goal in penalty shootout matches.

What is the difficulty level of this exercise?



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