oracle's first_value function for postgres?

From: Ben <bench(at)silentmedia(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: oracle's first_value function for postgres?
Date: 2005-09-13 19:15:21
Message-ID: 43272549.5060104@silentmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Oracle has a very handy function called first_value, which can be used
to turn a set like this:

a 10
a 3
b 1
c 30
c 10
d 1
d 20

...into this:

a 10
b 1
c 30
d 1

Does postgres have something equivalent, or, even better, is there a
reasonable way to express this in standard SQL?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ben 2005-09-13 19:38:41 Re: full outer join performance
Previous Message Tom Lane 2005-09-13 19:08:58 Re: full outer join performance