Reorganized title: Calculating the total value of other columns using MySQL's Group By and Sum
<p>I have two columns like this: </p>
<table class="s-table">
<thead>
<tr>
<th>Word</th>
<th>Amount</th>
</tr>
</thead>
<tbody>
<tr>
<td>dog</td>
<td>1</td>
</tr>
<tr>
<td>dog</td>
<td>5</td>
</tr>
<tr>
<td>Elephant</td>
<td>2</td>
</tr>
</tbody>
</table>
<p>I want to sum the amounts and get the result</p>
<table class="s-table">
<thead>
<tr>
<th>Word</th>
<th>Amount</th>
</tr>
</thead>
<tbody>
<tr>
<td>dog</td>
<td>6</td>
</tr>
<tr>
<td>Elephant</td>
<td>2</td>
</tr>
</tbody>
</table>
<p>What I have tried (and failed) so far is: </p>
<pre class="brush:php;toolbar:false;">SELECT word, SUM(amount) FROM `Data` GROUP BY 'word'</pre>
<p><br /></p>