X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 435C4310CA1 for ; Wed, 2 Jul 2003 02:43:08 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 44819-03 for ; Tue, 1 Jul 2003 23:42:58 -0300 (ADT) Received: from hotmail.com (law10-f105.law10.hotmail.com [64.4.15.105]) by svr1.postgresql.org (Postfix) with ESMTP id 95DF8310D80 for ; Tue, 1 Jul 2003 23:42:57 -0300 (ADT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 1 Jul 2003 19:42:58 -0700 Received: from 203.131.103.46 by lw10fd.law10.hotmail.msn.com with HTTP; Wed, 02 Jul 2003 02:42:58 GMT X-Originating-IP: [203.131.103.46] X-Originating-Email: [avsoledadjr@hotmail.com] From: "Don Soledad" To: pgsql-sql@postgresql.org Subject: columnar format Date: Wed, 02 Jul 2003 10:42:58 +0800 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 02 Jul 2003 02:42:58.0802 (UTC) FILETIME=[A5F88520:01C34043] X-Archive-Number: 200307/31 X-Sequence-Number: 14145 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