SQL merge and sum multiple rows into one
<p>Essentially I have a SQL table that looks like this;</p>

<pre><code>Name   Week 1  Week 2  Week 3  Week 4  Week 5
James  NULL    5       NULL    NULL    NULL
James  10      NULL    NULL    NULL    NULL
James  NULL    NULL    NULL    5       NULL
James  NULL    NULL    NULL    20      NULL
Tom    NULL    NULL    5       NULL    NULL
Tom    NULL    10      NULL    NULL    NULL
Tom    25      NULL    NULL    NULL    NULL
Tom    NULL    NULL    NULL    5       NULL
Tom    NULL    NULL    NULL    5       NULL
</code></pre>

<p>And I would want to combine together the rows (while also summing the values) to get something more like this;</p>

<pre><code>Name   Week 1  Week 2  Week 3  Week 4  Week 5
James  10      5       20      25      NULL
Tom    25      10      5       10      NULL
</code></pre>

<p>But I can't think of a good way of doing so. My data has quite the number of columns and rows so I'm looking for something which ideally doesn't require listing out all the individual column or row names.</p>

<p>Thanks</p>