SQL add columns of each record together : <p>To be blunt I don't know SQL however I don't want the answer, I want to work it out myself.</p>

<p>Here's the question:</p>

<p>Write a SQL query to calculate the number of goals for each team.</p>

<p>players</p>

<pre><code>id name team_id goals
1 Joel 1 3
2 Ed 2 1
3 Simon 2 4
</code></pre>

<p>teams</p>

<pre><code>id name
1 New Zealand
2 London
</code></pre>

<p>What I'm asking for is an arrow to information that will allow me to solve the question.</p>

<p>I've tried looking myself but I don't even know the correct terminology to ask the question, googling 'write sql to add fields for each row' just seems to return about adding columns or inserting.</p>
