Dave,
Why not test the windowing version I posted?
-- -- Josh Berkus PostgreSQL Experts Inc. http://www.pgexperts.com