[GENERAL] Average - Pg 9.2

Поиск
Список
Период
Сортировка
От Patrick B
Тема [GENERAL] Average - Pg 9.2
Дата
Msg-id CAJNY3iuhVuW=C1ijb-6=ptxLvDfBi+6jwNqcgNUHQfgpG7ZxAA@mail.gmail.com
обсуждение исходный текст
Ответы Re: [GENERAL] Average - Pg 9.2  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
Hi guys,

I've got a table which has id and created date columns.

I want to get the average of inserted rows monthly.
How can I get this data?

This query is not working as it is showing me same data in both columns.

select created_date,
AVG(id) 
OVER(ORDER BY created_date) AS avr from test


Thanks!
Patrick

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [GENERAL] Synchronous Commit, WAL archiving and statement_timeout
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: [GENERAL] Average - Pg 9.2