Re: Todo item: distinct clause - guidance

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Todo item: distinct clause - guidance
Дата
Msg-id bcd7b41fe5c31e489dbf2b84f71e54435b34594b.camel@cybertec.at
обсуждение исходный текст
Ответ на Todo item: distinct clause - guidance  (Ankit Kumar Pandey <itsankitkp@gmail.com>)
Ответы Re: Todo item: distinct clause - guidance  (Ankit Kumar Pandey <itsankitkp@gmail.com>)
Список pgsql-novice
On Sun, 2022-11-06 at 18:39 +0530, Ankit Kumar Pandey wrote:
> I was looking for some to-do item to pick up and came across 'Implement DISTINCT
> clause in window aggregates'. Can someone pleaseelaborate what is expectation here?
> Do feature request still exists as DISTINCT worked as expected if we try functions
> like avg(distinct col)?

Whis is about window functions, like

  WITH q(a,b) AS (VALUES (1, 1), (1, 1), (2, 1))
  SELECT *,
         count(DISTINCT a) OVER (PARTITION BY b)
  FROM q;

  ERROR:  DISTINCT is not implemented for window functions
  LINE 3:        count(DISTINCT a) OVER (PARTITION BY b)
                 ^

Yours,
Laurenz Albe



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

Предыдущее
От: Ankit Kumar Pandey
Дата:
Сообщение: Todo item: distinct clause - guidance
Следующее
От: Ankit Kumar Pandey
Дата:
Сообщение: Re: Todo item: distinct clause - guidance