Re: 2nd attempt: Window function SQL - can't quite figure it.

Поиск
Список
Период
Сортировка
От Pál Teleki
Тема Re: 2nd attempt: Window function SQL - can't quite figure it.
Дата
Msg-id CAMLfE0PiSoA6eEF6sEF-Q33phP43kh7gcqT+1PFcu1-nRu1Rag@mail.gmail.com
обсуждение исходный текст
Ответ на Re: 2nd attempt: Window function SQL - can't quite figure it.  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-novice
>> Now, why can't I use deptot and stot_per_man aliases in  my query? It
>> would greatly simplify the SQL by removing the need for a subquery (or inline
>> view as Oracle calls them).


> SQL execution of a query is only done once.  Referring to an alias at the
> same level in a query would require some kind of duplication to work.
> Either two phase processing or cloning the subselect that is being alised
> and executing it a second time to be used in the second location.  Neither
> are desirable.


Thanks for the assistance and clarification. Appreciate your time!


Pál



> David J.



--

--

Pál Teleki


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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: 2nd attempt: Window function SQL - can't quite figure it.
Следующее
От: KARIN SUSANNE HILBERT
Дата:
Сообщение: PostgreSQL v9.4, ERROR: must be owner of database test_db