Re: Average New Users Per DOW - Mailing list pgsql-general

From Robert DiFalco
Subject Re: Average New Users Per DOW
Date
Msg-id CAAXGW-y2Y+34SmjkQz-7wpHboeUF4TZAui5xZa-bJQ_EO-fw4w@mail.gmail.com
Whole thread Raw
In response to Re: Average New Users Per DOW  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Average New Users Per DOW  ("David G. Johnston" <david.g.johnston@gmail.com>)
List 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 by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Average New Users Per DOW
Next
From: "David G. Johnston"
Date:
Subject: Re: Average New Users Per DOW