Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 897CC9FB844 for ; Wed, 27 Jun 2007 05:13:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 33789-09 for ; Wed, 27 Jun 2007 05:13:04 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail2.itxmarket.com (fw.itxmarket.com [84.14.136.210]) by postgresql.org (Postfix) with ESMTP id E68479FB83A for ; Wed, 27 Jun 2007 05:13:02 -0300 (ADT) Received: from icommerce.fr (mich2.itxmarket.com [192.168.2.26]) by mail2.itxmarket.com (Postfix) with ESMTP id 580CC1C0937; Wed, 27 Jun 2007 10:10:45 +0200 (CEST) Received: by icommerce.fr (Postfix, from userid 1001) id 1309A2284D; Wed, 27 Jun 2007 10:13:00 +0200 (CEST) Date: Wed, 27 Jun 2007 10:12:59 +0200 From: Michael Landin Hostbaek To: "news.gmane.org" Cc: pgsql-sql@postgresql.org Subject: Re: Where clause Message-ID: <20070627081259.GR50866@mich2.itxmarket.com> Mail-Followup-To: Michael Landin Hostbaek , "news.gmane.org" , pgsql-sql@postgresql.org References: <20070626082405.GA67974@mich2.itxmarket.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 6.2-STABLE i386 X-PGP-Key: http://www.freebsdcluster.org/~mich/ User-Agent: Mutt/1.5.15 (2007-04-06) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.089 tagged_above=0 required=5 tests=AWL=-0.047, BAYES_50=0.001, FORGED_RCVD_HELO=0.135 X-Spam-Level: X-Archive-Number: 200706/231 X-Sequence-Number: 28721 news.gmane.org (nis) writes: > SELECT * FROM > ( > select cid,count(distinct contactid) from tracking where click = > true group by cid > ) c1 > FULL OUTER JOIN > ( > select cid,count(distinct contactid) from tracking where view = > true group by cid > ) c2 > USING (cid); That did the trick! Many thanks, Mike