Re: Grouping aggregate functions

Поиск
Список
Период
Сортировка
От Kai Hessing
Тема Re: Grouping aggregate functions
Дата
Msg-id 49fbcaFo7lnfU1@individual.net
обсуждение исходный текст
Ответ на Re: Grouping aggregate functions  (Richard Connamacher <rich.n1@indieimage.com>)
Список pgsql-general
Richard Connamacher wrote:
> This came up with an error too, but it pointed me in the right
> direction and was easy to fix. I needed to use an alias for the
> entire subquery too, so what finally worked is this:
>
> SELECT avg(minprice) FROM
>     (SELECT min(price) AS minprice FROM weekly_supply_prices GROUP BY
> month) AS minprice_table;

Interesting, but you're right ;) Btw. if you want you may skip the 'AS'.
Just 'SELECT ... FROM (....) mt;

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

Предыдущее
От: "patrick"
Дата:
Сообщение: Re: recover from base directory?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: recover from base directory?