Re: Rows to columns - Mailing list pgsql-general

From Joe Conway
Subject Re: Rows to columns
Date
Msg-id 403B9F68.7030801@joeconway.com
Whole thread Raw
In response to Rows to columns  (Josué Maldonado <josue@lamundial.hn>)
List pgsql-general
Josué Maldonado wrote:
> The problem is I need show the data in this way:
>
> TIPO    OCT03    NOV03    DIC03    ENE04    FEB04
> --------------------------------------------------------
> NQTY     490     360     950     700     500
> NSOLD    4600    3900    7100    6200    5000
> NCOST    1850    1760    3000    2900    2300
>
> Any idea or suggestion?

See contrib/tablefunc for a function called crosstab().

HTH,

Joe

pgsql-general by date:

Previous
From: Josué Maldonado
Date:
Subject: Rows to columns
Next
From: Tom Lane
Date:
Subject: Re: Found this in the server log on MAC OSX