Обсуждение: [GENERAL] From the "SQL is verbose" department, WINDOW RANGE specifications

Поиск
Список
Период
Сортировка

[GENERAL] From the "SQL is verbose" department, WINDOW RANGE specifications

От
"David G. Johnston"
Дата:
The default range specification is:

RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW

It seems like a common second choice is to want:

RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING

Why did they have to make something so common take 49 characters that, for seldom-using users, is nearly impossible to remember?

The following would seem to suffice:

{ RANGE | ROWS } ALL

I'd be happy to use non-portable syntax here...

As an aside, I'd vote to add the entire WINDOW syntax specification to the Synopsis.  The main parameters section can remain as-is in order to aid in reading comprehension - but having to search out the parameters area just to remind oneself of the extremely verbose syntax is a bit annoying.  All of the other sections are represented in both the main synopsis and the parameters in this manner and I think WINDOW doesn't warrant an exception (especially vis-a-via both the from_item and grouping_element specifications).

David J.