X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 4168647674D for ; Thu, 15 May 2003 11:43:28 -0400 (EDT) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with ESMTP id 30981-02 for ; Thu, 15 May 2003 11:42:57 -0400 (EDT) Received: from davinci.ethosmedia.com (unknown [209.10.40.251]) by postgresql.org (Postfix) with ESMTP id 25B92476731 for ; Thu, 15 May 2003 11:42:57 -0400 (EDT) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 3036019; Thu, 15 May 2003 08:43:04 -0700 Content-Type: text/plain; charset="iso-8859-2" From: Josh Berkus Organization: Aglio Database Solutions To: Christoph Haller , pgsql-sql@postgresql.org Subject: Re: Calculating Percentages Date: Thu, 15 May 2003 08:42:33 -0700 User-Agent: KMail/1.4.3 Cc: dsiegal@brave.cs.uml.edu References: <3EC35832.8BA90263@rodos.fzk.de> In-Reply-To: <3EC35832.8BA90263@rodos.fzk.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200305150842.33629.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/317 X-Sequence-Number: 13482 Chris, > You'll have to GROUP BY nationality, total_members Oops. Problem with posting untested SQL ... > > > would this repeatedly execute the inner query over and over? > > > > No, it'd do it just once, because the sub-select has no dependency on > > the outer select. (If the sub-select used any variables from the That's great, Tom. Yet another place where we've surpassed MS SQL Server in query implementation. -- Josh Berkus Aglio Database Solutions San Francisco