Re: Average New Users Per DOW

Поиск
Список
Период
Сортировка
От Robert DiFalco
Тема Re: Average New Users Per DOW
Дата
Msg-id CAAXGW-y2Y+34SmjkQz-7wpHboeUF4TZAui5xZa-bJQ_EO-fw4w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Average New Users Per DOW  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Average New Users Per DOW  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
​I am fairly certain this does not give you the correct results.  Specifically, the minimum value for each cDate is going to be 1 since count(*) counts NULLs.  count(u) should probably work.


Yes you are right, I forgot to change COUNT(*) to COUNT(id), as you mention COUNT(u.*) will also work. I just couldn't get the idea of generating a sequence form 0 to 6 to work correctly. The approach I'm using seems to give the correct results (with COUNT(u.id)). 

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Average New Users Per DOW
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Average New Users Per DOW