From: ivan@adicional.com.br
To: pgsql-bugs@postgresql.org
Subject: problem in sql - sum()
Date: Tue, 22 Mar 2016 11:42:09 -0300 (BRT)
Message-ID: <206706195.1632677.1458657729534.JavaMail.zimbra@adicional.com.br> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Hi. I have a problem identified.
In select :
select data_carteira, sum(valor_carteira) from carteira where
data_carteira between '2016-01-01' and '2016-02-18'
GROUP BY data_carteira order by data_carteira
return a values from month. In the day 18, return the value 82.915.213,14.
Now, if I use the select :
select data_carteira, sum(valor_carteira) from carteira where
data_carteira='2016-01-18'
GROUP BY data_carteira order by data_carteira
return 103.629.305,96.
It's very diferenty.
Only change is date.
The version in use is :
PostgreSQL 9.0.8 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2), 64-bit
Please, helpe me.
Thanks,
Ivan Rodrigues
Brazil - São Paulo
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: ivan@adicional.com.br
Subject: Re: problem in sql - sum()
In-Reply-To: <206706195.1632677.1458657729534.JavaMail.zimbra@adicional.com.br>
References: <206706195.1632677.1458657729534.JavaMail.zimbra@adicional.com.br>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox