pacquet@newsguy.com writes:
> ... I know we could use Pivot Tables in
> Excel, or otherwise do it on the client, but the highest-leverage solution
> would be to present this abstraction in the server.
Joe Conway's contrib/tablefunc module (new for 7.3) has a "crosstab"
facility that I think might do what you want. Perhaps you'd like to
snag a 7.3 beta copy and try it out.
regards, tom lane