Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiR5X-0001Zp-Ic for pgsql-bugs@arkaria.postgresql.org; Tue, 22 Mar 2016 18:31:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aiR5X-00056B-5N for pgsql-bugs@arkaria.postgresql.org; Tue, 22 Mar 2016 18:31:31 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aiNVf-0001cD-98 for pgsql-bugs@postgresql.org; Tue, 22 Mar 2016 14:42:15 +0000 Received: from 170-static-inova.u.inova.com.br ([177.154.132.170] helo=mxlite1.u.inova.com.br) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiNVc-0004Cp-0s for pgsql-bugs@postgresql.org; Tue, 22 Mar 2016 14:42:13 +0000 Received: from mxlite1.u.inova.com.br (localhost [127.0.0.1]) by mxlite1.u.inova.com.br (Postfix) with ESMTP id 90F9C315184 for ; Tue, 22 Mar 2016 14:42:09 +0000 (UTC) Received: from r-su8.u.inova.com.br (r-su8.u.inova.com.br [192.168.6.61]) by mxlite1.u.inova.com.br (Postfix) with ESMTP for ; Tue, 22 Mar 2016 14:42:09 +0000 (UTC) Received: from r-zu2.u.inova.com.br (r-zu2.u.inova.com.br [192.168.6.63]) by r-su8.u.inova.com.br (Postfix) with ESMTP id 87F0514020 for ; Tue, 22 Mar 2016 11:42:09 -0300 (BRT) Date: Tue, 22 Mar 2016 11:42:09 -0300 (BRT) From: ivan@adicional.com.br To: pgsql-bugs@postgresql.org Message-ID: <206706195.1632677.1458657729534.JavaMail.zimbra@adicional.com.br> Subject: problem in sql - sum() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [192.168.6.67] X-Mailer: Zimbra 8.6.0_GA_1194 (zclient/8.6.0_GA_1194) Thread-Topic: problem in sql - sum() Thread-Index: xpT23UK+HYaL1ZcJxpAHG1uRmfWhXg== x-mxHero-Origin-Ip: /127.0.0.1:49836 X-Pg-Spam-Score: -0.5 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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=3D'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=C3=A3o Paulo --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs