Re: summing tables

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: summing tables
Дата
Msg-id 87u19nls0i.fsf@stark.dyndns.tv
обсуждение исходный текст
Ответ на summing tables  (Erik Thiele <erik@thiele-hydraulik.de>)
Список pgsql-sql
"Viorel Dragomir" <bc@vio.ro> writes:

> Anyway, in real life this update modifies only one row with a value wich is
> diff of null. It was really handy if it was specified the option ORDER for
> the update command.

Are you hoping to produce a running total? That's very difficult in standard
SQL. That would be very different from the query you asked for. 

Running totals, ranking, lead/lag, are all things that are very difficult to
do in standard SQL. They don't fit in the unordered set model that SQL follows
so doing them without special non-standard functions is very hard and
inefficient. 

The functions to do them don't fit well within the SQL universe either, which
might be why they don't exist yet in postgres.

-- 
greg



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

Предыдущее
От: "Viorel Dragomir"
Дата:
Сообщение: Re: summing tables
Следующее
От: greg@turnstep.com
Дата:
Сообщение: Re: Count dates distinct within an interval