getting daily stats for event counts - Mailing list pgsql-general

From David Gauthier
Subject getting daily stats for event counts
Date
Msg-id CAMBRECA2_ahWXbCDxynPob7cvyjOXVPQC7aqCgscq=tXiD9B1g@mail.gmail.com
Whole thread Raw
Responses Re: getting daily stats for event counts  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi:  
9.6.0 on linux

I have a table which logs the inception of an event with an "incept_datetime" (timestamptz) field.  I want to know how many events occurred per day from one date to the next using midnight as a marker for each day reported.  The end result should be something like...

2019-06-23  44
2019-06-24  18
2019-06-25  38
etc...

Is there a query that can do this ?

pgsql-general by date:

Previous
From: Ron
Date:
Subject: Re: UPDATE on 20 Million Records Transaction or not?
Next
From: Tom Lane
Date:
Subject: Re: getting daily stats for event counts