title: how to group by and return sum row in Postgres
body: <p>I am stuck here. I have row in Postgres like this:</p>
  
  <pre><code>id      amount
  a       5000
  a       1500
  a       500
  b       2000
  b       1000
  c       4000
  </code></pre>
  
  <p>How is the sql syntax to get result like this?</p>
  
  <pre><code>id      amount
  a       7000
  b       3000
  c       4000
  </code></pre>