Re: DISTINCT ON () with UNION - Mailing list pgsql-sql

From Tom Lane
Subject Re: DISTINCT ON () with UNION
Date
Msg-id 4539.989801559@sss.pgh.pa.us
Whole thread Raw
In response to DISTINCT ON () with UNION  (pgsql@peope.net)
List pgsql-sql
pgsql@peope.net writes:
> How can you use a distinct on () including the whole union.

In 7.1 you can write

select distinct ... from (select ... union select ...) ss;
        regards, tom lane


pgsql-sql by date:

Previous
From: pgsql@peope.net
Date:
Subject: DISTINCT ON () with UNION
Next
From: "Subhramanya Shiva"
Date:
Subject: how to remove ?