Re: Time interval sums

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "A(dot) R(dot) Van Hook" <hook(at)lake-lotawana(dot)mo(dot)us>
Cc: General Postgresql List <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Time interval sums
Date: 2006-10-02 21:29:52
Message-ID: 15325.1159824592@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"A. R. Van Hook" <hook(at)lake-lotawana(dot)mo(dot)us> writes:
> How does one sum interval sums?
> the following does not work:
> select sum(stop-start::interval) as total from startstop

Define "does not work"? What did you get, what were you hoping for?

Personally I'd drop the unnecessary cast, but AFAICS there are
appropriate operators at least as far back as 7.3.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Bruno Wolff III 2006-10-03 00:20:49 Re: How to FindNearest
Previous Message A. R. Van Hook 2006-10-02 20:58:53 Time interval sums