How can I convert sum(interval) to seconds?
select sum(interval_field) from tablename where condition=condition; ID | LOGIN | INTERVAL -------------------------- 1 | JOHN | 00:00:18 2 | JOHN | 00:45:10 If I say, select sum(interval) from tablename where login='john'; it will give me 00:45:28 (That's 45 mins, and 28 secs). How can I convert that to seconds? Can I possibly do it in just one query? Thank you ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html