Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 170E84762C1 for ; Mon, 16 Sep 2002 10:55:31 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 5A696476262 for ; Mon, 16 Sep 2002 10:55:30 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g8GEtW5D027214; Mon, 16 Sep 2002 10:55:33 -0400 (EDT) To: pacquet@newsguy.com Cc: pgsql-sql@postgresql.org Subject: Re: "Inverting" a table, OLAP-style In-reply-to: <200209132318.QAA09972@newsguy.com> References: <200209132318.QAA09972@newsguy.com> Comments: In-reply-to pacquet@newsguy.com message dated "Fri, 13 Sep 2002 16:18:54 -0700" Date: Mon, 16 Sep 2002 10:55:32 -0400 Message-ID: <27213.1032188132@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/177 X-Sequence-Number: 9454 pacquet@newsguy.com writes: > ... I know we could use Pivot Tables in > Excel, or otherwise do it on the client, but the highest-leverage solution > would be to present this abstraction in the server. Joe Conway's contrib/tablefunc module (new for 7.3) has a "crosstab" facility that I think might do what you want. Perhaps you'd like to snag a 7.3 beta copy and try it out. regards, tom lane