Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtwbe-0003ba-Be for pgsql-general@arkaria.postgresql.org; Wed, 13 Feb 2019 15:37:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gtwbd-0002ew-5m for pgsql-general@arkaria.postgresql.org; Wed, 13 Feb 2019 15:37:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtwbc-0002ep-UD for pgsql-general@lists.postgresql.org; Wed, 13 Feb 2019 15:37:48 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtwba-0005jZ-RC for pgsql-general@lists.postgresql.org; Wed, 13 Feb 2019 15:37:48 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id D894E99356 for ; Wed, 13 Feb 2019 07:37:44 -0800 (PST) Date: Wed, 13 Feb 2019 07:37:44 -0800 (PST) From: Rich Shepard To: "pgsql-generallists.postgresql.org" Subject: Re: Subquery to select max(date) value In-Reply-To: Message-ID: References: <2780074d-3b87-b154-8bc6-a0f898fbdde2@openvistas.net> User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, 13 Feb 2019, Adrian Klaver wrote: > The LEFT JOIN. There are rows in people for which there no records coming > from the sub-select on activities, so the row is 'padded' with NULL values > for the missing data. Adrian, I assume it's the inner left join. I'll trace what's happening at each step and learn where to specify no nulls. Thanks, Rich