Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 9979C9FA083 for ; Tue, 11 Sep 2007 18:46:25 -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 67942-07 for ; Tue, 11 Sep 2007 18:46:22 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.229]) by postgresql.org (Postfix) with ESMTP id A66CF9F9E6B for ; Tue, 11 Sep 2007 18:46:22 -0300 (ADT) Received: by wx-out-0506.google.com with SMTP id r21so1982wxc for ; Tue, 11 Sep 2007 14:46:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=JOnm2uWiI/6o/USAUovJ/K30ol4te5eoNwWDsyrsqkE=; b=A8Z1iTtsp0QfUFZL96PVEBP1EDjcPSb6Gp8APTItVzP2ThMlWyoemMyEgaVwXAo2YpAwxkHncvg0ALPIGxPxPx4o+K91eWYWuK0c1CTpcxIVYgNQ4UId7gCm6VONLfgLDc4lY4dVc0wpejwlTHSmFvc40FUsMEVjwuS1ixN/zqM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=sUShVGxwR1hIv3i/D1nOhfNf5K5RZiKuq0K7kG0WI2xY0Dp3bx+nm+r3+nQQPWDLYl698TYuc64KwFtcPSOqKJwcIZmWUbXdzqjIzwvSdHuvohSKOufASUreGkAdR9jcfs6CXYX2Jy3wjCMMVnfHegJUEOiQ2hXB3jE6oCMV4Sg= Received: by 10.90.49.1 with SMTP id w1mr13721919agw.1189547177173; Tue, 11 Sep 2007 14:46:17 -0700 (PDT) Received: by 10.90.117.8 with HTTP; Tue, 11 Sep 2007 14:46:17 -0700 (PDT) Message-ID: Date: Tue, 11 Sep 2007 16:46:17 -0500 From: "=?UTF-8?Q?Rodrigo_De_Le=C3=B3n?=" To: "Koen Bok" Subject: Re: Simple Query? Cc: pgsql-sql@postgresql.org In-Reply-To: <2C0EA394-5AC8-4FC8-99F3-5FAEE9720360@madebysofa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <2C0EA394-5AC8-4FC8-99F3-5FAEE9720360@madebysofa.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/84 X-Sequence-Number: 29297 On 9/11/07, Koen Bok wrote: > Anyone has a hint? Another way: SELECT i.* FROM item i JOIN search_item s1 ON i.ID = s1.id_item JOIN search_item s2 ON s1.id_item = s2.id_item JOIN search_item s3 ON s2.id_item = s3.id_item WHERE s1.id_search = 1 AND s2.id_search = 2 AND s3.id_search = 3