Re: Numbering rows

Поиск
Список
Период
Сортировка
От ries van Twisk
Тема Re: Numbering rows
Дата
Msg-id 16170243-B840-4478-BA05-99221EA67915@rvt.dds.nl
обсуждение исходный текст
Ответ на Numbering rows  (Mark Morgan Lloyd <markMLl.pgsql-general@telemetry.co.uk>)
Ответы Re: Numbering rows  ("Richard Broersma" <richard.broersma@gmail.com>)
Список pgsql-general
May be this function can help :

http://www.postgresql.org/docs/8.3/static/functions-srf.html

Ries
On Oct 15, 2008, at 1:44 PM, Mark Morgan Lloyd wrote:

> Is there an easy way to assign a sequential number, possibly based
> on an arbitrary minimum (typically 0 or 1) to each row of an ordered
> result set, or do I have to work with explicit sequences?
>
> I need to do quite a lot of maths on successive rows, extracting
> numeric and timestamp differences hence rates of change. I've
> typically been doing it manually or in a spreadsheet but there has
> to be a better way e.g. by a join on offset row numbers.
>
> --
> Mark Morgan Lloyd
> markMLl .AT. telemetry.co .DOT. uk
>
> [Opinions above are the author's, not those of his employers or
> colleagues]
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general








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

Предыдущее
От: Mark Morgan Lloyd
Дата:
Сообщение: Numbering rows
Следующее
От: "Richard Broersma"
Дата:
Сообщение: Re: Numbering rows