sum of a time column

Поиск
Список
Период
Сортировка
От arief#
Тема sum of a time column
Дата
Msg-id 1078478877.9610.12.camel@damai.telkomsel.co.id
обсуждение исходный текст
Ответы Re: sum of a time column  (Pavel Stehule <stehule@kix.fsv.cvut.cz>)
Re: sum of a time column  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: sum of a time column  ("scott.marlowe" <scott.marlowe@ihs.com>)
Список 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






В списке pgsql-general по дате отправления:

Предыдущее
От: Mike Mascari
Дата:
Сообщение: Re: Moving from MySQL to PGSQL....some questions (multilevel
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: sum of a time column