pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
columnar format
2+ messages / 2 participants
[nested] [flat]

* columnar format
@ 2003-07-02 02:42  Don Soledad <avsoledadjr@hotmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Don Soledad @ 2003-07-02 02:42 UTC (permalink / raw)
  To: pgsql-sql

good day!

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.

your help will be much appreciated.

thanks!Ü

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: columnar format
@ 2003-07-08 08:44  Christoph Haller <ch@rodos.fzk.de>
  0 siblings, 0 replies; 2+ messages in thread

From: Christoph Haller @ 2003-07-08 08:44 UTC (permalink / raw)
  To: pgsql-sql; avsoledadjr@hotmail.com

>
> 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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2003-07-08 08:44 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-07-02 02:42 columnar format Don Soledad <avsoledadjr@hotmail.com>
2003-07-08 08:44 Re: columnar format Christoph Haller <ch@rodos.fzk.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox