From: | Christoph Haller <ch(at)rodos(dot)fzk(dot)de> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org, avsoledadjr(at)hotmail(dot)com |
Subject: | Re: columnar format |
Date: | 2003-07-08 08:44:50 |
Message-ID: | 3F0A8481.D9F01154@rodos.fzk.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
>
> i would like to ask for the sql statement to the output:
>
> ITEM DESC Jan Feb Mar Apr ... Sep Total
> xxxxxxxxxx 999 999 999 999 ... 999 9,999
>
> where "Jan" column is sum of all "x" items purchased on Jan, "Feb"
column as
> sum of Feb purchases, and so on up to "Sep", and "Total" as the total
from
> "Jan" to "Sep" (as in the case here). the numbers may/may not be
formatted,
> and the period varies, depending on the range.
>
Search the archives for pivot tables resp. crosstab and/or have a look
at
$PGSQLD/contrib/tablefunc/README.tablefunc
Regards, Christoph
From | Date | Subject | |
---|---|---|---|
Next Message | Luis Sousa | 2003-07-08 16:29:58 | Setuid functions |
Previous Message | scott.marlowe | 2003-07-07 22:55:53 | Re: avoid select expens_expr(col) like unneccessary calculations |