Re: [SQL] Time interval sums

2006-10-02 Thread Tom Lane
"A. R. Van Hook" <[EMAIL PROTECTED]> 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

[SQL] Time interval sums

2006-10-02 Thread A. R. Van Hook
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 se