[SQL] how many times - Mailing list pgsql-sql

From Campbell, Lance
Subject [SQL] how many times
Date
Msg-id B75CD08C73BD3543B97E4EF3964B7D7047D3E9E8@CITESMBX1.ad.uillinois.edu
Whole thread Raw
Responses Re: [SQL] how many times  (Rob Sargent <robjsargent@gmail.com>)
Re: [SQL] how many times  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: [SQL] how many times  (Michael Moore <michaeljmoore@gmail.com>)
List pgsql-sql

I am not for sure how to do the below.  I was hoping someone could share their thoughts.

 

Assume I have a table called T1.  It contains a single filed called “viewed” that is of type timestamp.

 

Every time someone views a particular web page we insert the current timestamp into T1.

 

Now I need to ask this business question:

 

On average in any consecutive five minute time frame how many times is the web page viewed?

 

Thanks,

 

Lance

pgsql-sql by date:

Previous
From: Michael Moore
Date:
Subject: Re: [SQL] Updating jsonb rows
Next
From: Rob Sargent
Date:
Subject: Re: [SQL] how many times