Re: oracle's first_value function for postgres?

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: oracle's first_value function for postgres?
Дата
Msg-id 20050913203250.GL6026@ns.snowman.net
обсуждение исходный текст
Ответ на oracle's first_value function for postgres?  (Ben <bench@silentmedia.com>)
Ответы Re: oracle's first_value function for postgres?  (Ben <bench@silentmedia.com>)
Список pgsql-general
* Ben (bench@silentmedia.com) wrote:
> 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?

Isn't this just: distinct on (col1)?

    Stephen

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: "Craig"
Дата:
Сообщение: Ranking Results
Следующее
От: Ben
Дата:
Сообщение: Re: oracle's first_value function for postgres?