How to use the CROSSTAB function in PostgreSQL

How to use the CROSSTAB function in PostgreSQL