Re: Rows to columns

From: Joe Conway <mail(at)joeconway(dot)com>
To: Josué Maldonado <josue(at)lamundial(dot)hn>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Rows to columns
Date: 2004-02-24 19:00:56
Message-ID: 403B9F68.7030801@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-02-24 19:12:29 Re: Found this in the server log on MAC OSX
Previous Message Josué Maldonado 2004-02-24 18:45:23 Rows to columns