Re: Average New Users Per DOW

From: Robert DiFalco <robert(dot)difalco(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Paul Jungwirth <pj(at)illuminatedcomputing(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Average New Users Per DOW
Date: 2015-07-06 20:40:17
Message-ID: CAAXGW-y2Y+34SmjkQz-7wpHboeUF4TZAui5xZa-bJQ_EO-fw4w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)).

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2015-07-06 20:50:12 Re: Average New Users Per DOW
Previous Message David G. Johnston 2015-07-06 20:19:00 Re: Average New Users Per DOW