SQL exercises on soccer Database: Find those two teams which scored three goals in a single game at this tournament
SQL soccer Database: Joins Exercise-27 with Solution
27. Write a query in SQL to find those two teams which scored three goals in a single game at this tournament.
Sample table: match_details
Sample table: soccer_country
SELECT match_no,country_name FROM match_details a JOIN soccer_country b ON a.team_id=b.country_id WHERE goal_score=3 AND win_lose='D';
match_no | country_name ----------+-------------- 34 | Hungary 34 | Portugal (2 rows)
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 oldest player to have appeared in a EURO cup 2016 match.
Next: Write a query in SQL to find the teams with other information that finished bottom of their respective groups after conceding four times in three games.
What is the difficulty level of this exercise?