Re: [SQL] Re: sum gives different answer - Mailing list pgsql-sql

From Clark Evans
Subject Re: [SQL] Re: sum gives different answer
Date
Msg-id 36EBFB83.F425A2FE@manhattanproject.com
Whole thread Raw
In response to Re: sum gives different answer  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Chairudin Sentosa <chairudin@prima.net.id> writes:
> select pin, sum(duration) from tablename where date(start_time)=
> (select date 'today') group by pin;
> pin|sum
> - ---+---
>    |
> (1 row)

Definately a bug.

Tom Lane wrote:
> SUM() should never have been applied at all

Yep.

Clark Evans

pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: sum gives different answer
Next
From: Vikrant Rathore
Date:
Subject: Mail about FOREIGN KEY