Unique - first - Mailing list pgsql-general

From Robert James
Subject Unique - first
Date
Msg-id CAGYyBgjdOCm-OJ7D-2TP8_417f8U5tgKJrtE0q=m_nSFjFsAEg@mail.gmail.com
Whole thread Raw
Responses Re: Unique - first
Re: Unique - first
Re: Unique - first
List pgsql-general
I have a table (x,y,z) - I'd like to take the rows with unique x
values - but, when more than one row have the same x value, I want the
one with the minimal z value.

How can I do that? I can imagine doing it with window functions, but
also that regular SQL should be able to do it too.


pgsql-general by date:

Previous
From: Alan Nilsson
Date:
Subject: Re: Segmentation fault: pg_upgrade 9.1 to 9.3: pg_dump: row number 0 is out of range 0..-1
Next
From: Thomas Kellerer
Date:
Subject: Re: Unique - first