weird sum() results

From: Hitesh Patel <hitesh(at)presys(dot)com>
To: "pgsql-general(at)postgreSQL(dot)org" <pgsql-general(at)postgreSQL(dot)org>
Subject: weird sum() results
Date: 2000-01-20 00:33:06
Message-ID: 388657C2.2697A6CE@presys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a table with a filed named 'amount' and all the values are
positive values, but if i do this:

select sum(amount) from table where state = 'CA';

I get a negative number. Doing a

select name, amount from table where state = 'CA' and amount < '0';

Returns 0 rows. Any ideas as to why i'm getting a negative value for
the sum()?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marc Tardif 2000-01-20 01:43:36 apache logs to pgsql
Previous Message Cristian Stuardo I. 2000-01-20 00:33:00 alter question