Re: SELECT DISTINCT ON removes results

From: Guyren Howe <guyren(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: SELECT DISTINCT ON removes results
Date: 2016-10-28 21:17:34
Message-ID: 1899F60F-A8F6-41A0-9A56-1A7C824A0E56@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Oct 28, 2016, at 14:15 , Guyren Howe <guyren(at)gmail(dot)com> wrote:
>
> On Oct 28, 2016, at 13:50 , David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com <mailto:david(dot)g(dot)johnston(at)gmail(dot)com>> wrote:
>>
>> ​On its face the statement "DISTINCT ON removes results" is not at all surprising given its definition.
>
> What is surprising is that it removes *all* results…

The inner query on its own appears to produce the same results, but the left join with it in either case produces different results.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Guyren Howe 2016-10-28 21:25:23 Re: SELECT DISTINCT ON removes results
Previous Message Guyren Howe 2016-10-28 21:15:23 Re: SELECT DISTINCT ON removes results