3 table
id and matchid is the join index of two table
If one col name appears in two table, we must specify
table.col to avoid error.
List the dates of the matches and the name of the team in which 'Fernando Santos' was the team1 coach.
Since id
is in both game and eteam table, we must specify eteam.id
use DISTINCT to filter out duplicate query
Someone might score against Germany in different games
Also teamid cannot be Germany :+1:
Two example above: GROUP BY with 2 indexes
If it was a team 1 goal then a 1 appears in score 1, otherwise there is a 0. You could SUM this column to get a count of the goals scored by team1. Sort your result by mdate, matchid, team1 and team2. Example output:
NEW Command : LEFT JOIN will be introduce later
SQL
beginner
tutorial`