sum of a time column

From: arief# <arief_m_utama(at)telkomsel(dot)co(dot)id>
To: pgsql-general(at)postgresql(dot)org
Subject: sum of a time column
Date: 2004-03-05 09:27:57
Message-ID: 1078478877.9610.12.camel@damai.telkomsel.co.id
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear all,

I'm sorry if this sounds stupid or have been talked about before.

Suppose I have a field in my table that's called duration with type
'time without timezone'. How do I do sum on this field based on another
field let say called dateofevent?

SQL: SELECT SUM(duration) FROM durtable GROUP BY dateofevent;

gives me:

ERROR: Unable to select an aggregate function sum(time without time
zone)

Is this because of me still using PostgreSQL version 7.2.1 from Debian
Woody? Or some other stupidity?

TIA, Regards.
-arief

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Garamond 2004-03-05 11:09:42 Re: building 7.4.1 (on linux) with --disable-shared
Previous Message Pavel Stehule 2004-03-05 09:26:24 Re: sum of a time column