X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.192]) by svr1.postgresql.org (Postfix) with ESMTP id 7B7F6CC2D8 for ; Tue, 15 Jul 2003 13:29:34 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr4.postgresql.org [64.117.224.192]) (amavisd-new, port 10024) with ESMTP id 77961-04 for ; Tue, 15 Jul 2003 13:29:57 +0000 (GMT) Received: from localhost.localdomain (pcp02833531pcs.levtwn01.pa.comcast.net [68.80.216.199]) by svr1.postgresql.org (Postfix) with ESMTP id 2F601CB9AA for ; Tue, 15 Jul 2003 10:29:32 -0300 (ADT) Received: from localhost.localdomain (hvar [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.5) with ESMTP id h6FDU1rw003966 for ; Tue, 15 Jul 2003 09:30:02 -0400 Received: (from mail@localhost) by localhost.localdomain (8.12.8/8.12.8/Submit) id h6FDU1gE003963 for pgsql-sql@postgresql.org; Tue, 15 Jul 2003 09:30:01 -0400 X-Authentication-Warning: localhost.localdomain: mail set sender to pgsql-sql-account@basebeans.net using -f To: pgsql-sql@postgresql.org X-Injected-Via-Gmane: http://gmane.org/ Received: from localhost.localdomain (hvar [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.5) with ESMTP id h6FDQOrw003893 for ; Tue, 15 Jul 2003 09:26:25 -0400 Received: (from news@localhost) by localhost.localdomain (8.12.8/8.12.8/Submit) id h6FDQOwo003891 for pgSQL@basebeans.net; Tue, 15 Jul 2003 09:26:24 -0400 Path: not-for-mail From: teknokrat Subject: help with troublesome query Date: Tue, 15 Jul 2003 14:26:16 +0100 Organization: baseBeans Engineering Lines: 11 Message-ID: Reply-To: teknokrat@yahoo.com NNTP-Posting-Host: borsh01.free-online.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: localhost.localdomain 1058275584 3890 212.56.93.181 (15 Jul 2003 13:26:24 GMT) X-Complaints-To: news@news.basebeans.net NNTP-Posting-Date: Tue, 15 Jul 2003 13:26:24 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0+) Gecko/20020518 X-Accept-Language: en-us, en X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/167 X-Sequence-Number: 14281 I have three tables customers which 1-many with requests which is 1-1 with applications. all customers have at least one request but not all requests have an application. I want a query to return all the customers and their application data if they have any ( or else null). So this is like a left join of customers with applications but I do not want multiple rows of customers UNLESS they have an application. thanks