title: How SUM numeric datatype postgreSQL
body: <p>I am new  using postgresql and have problem when sum record, because give a zero result.</p>
  
  <p>this my db table</p>
  
  <pre><code>user_id   amount
  981       1200000.0000
  981       -170000.0000
  981       -144500.0000
  981       -249800.0000
  </code></pre>
  
  <p>the amount field using "numeric" datatype
  and this my query</p>
  
  <pre><code>SELECT user_id, SUM(amount) as amount FROM transaction where user_id = 981;
  </code></pre>
  
  <p>how to fix this, thanks</p>