Didier Gasser-Morlay <didiergm(at)gmail(dot)com> writes:
> I have got several reports to write which involve some sort of
> transposition.
I think what you're looking for is "crosstab". Look into
contrib/tablefunc for some functions that will help.
regards, tom lane