title: Sum returns 0 on a money column
body: <p>When I run this query:</p>
  
  <pre><code>SELECT [id],[amount],sum(amount) as Total
    FROM transaction
      where id='035'
    group by id, amount
  </code></pre>
  
  <p>I get some results like</p>
  
  <pre><code>id          amount      Total
  035         -55115.24   -55115.24
  035         -2126.14    -2126.14 
  </code></pre>
  
  <p>However when I try to get a total (for the <code>amount</code> column), using this query;</p>
  
  <pre><code> select id, count(*) as howMany, sum(amount) as Total
  from transaction
  where id='035'
  group by id
  order by count(*) desc
  </code></pre>
  
  <p>I get these results.</p>
  
  <pre><code>id              howMany Total
  035             2        0.00
  </code></pre>
  
  <p>I would expect to get</p>
  
  <pre><code>id              howMany Total
  035             2        -057241.38
  </code></pre>
  
  <p>I have tried to simplify the query, without the count, just to check if the sum is working</p>
  
  <pre><code>select id, sum(amount) as Total
  from transaction
  where id='035'
  group by id
  </code></pre>
  
  <p>But again this gives me 0 as my total</p>
  
  <pre><code>id     Total
  035     0.00
  </code></pre>
  
  <p>I have also tried this on id's that have positive values in their amount column but get the same behavior.</p>
  
  <p>To clarify, I would like the total of the values in the <code>amount</code> column for each <code>id</code>, in the whole table, not just each row, but I only get zeroes when using the <code>SUM</code> function in SQL.</p>
  
  <p>Another thing I noticed, the <code>id</code> column is an <code>nvarchar</code>, not the ID/key for the table. It is an old database which favors just linking nvarchars over primary keys, for some reason. I cannot change the table structure.</p>
  
  <p>Schema</p>
  
  <pre><code>CREATE TABLE [dbo].[transaction](
      [trindex] [int] IDENTITY(1,1) NOT NULL,
      [id] [varchar](15) NULL,
      [date] [datetime] NULL,
      [amount] [money] NULL,
      [acct] [varchar](20) NULL
  )
  </code></pre>