How does one sum interval sums?
the following does not work:
select sum(stop-start::interval) as total from startstop
where sid = 545 and
2006 = date_part('year', day) and
9 = date_part('month', day)
however select stop-start::interval) as total from startstop
where sid = 545 and
2006 = date_part('year', day) and
9 = date_part('month', day)
works great but I need an overall sum
Table schema:
Table "public.startstop"
Column | Type | Modifiers
--------+------------------------+-----------
sid | integer | not null
start | time without time zone |
stop | time without time zone |
day | date | not null
thanks
--
Arthur R. Van Hook
Mayor
The City of Lake Lotawana
[EMAIL PROTECTED]
(816) 578-4704 - Home
(816) 578-4215 - City
(816) 564-0769 - Cell
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq