SQL counting to see trend

From: <library.treasures_at_NOSPAMsaqnet.co.uk>
Date: Tue, 02 Oct 2001 11:19:20 GMT
Message-ID: <3bb99812.8998852_at_news.easynet.co.uk>



[Quoted] There in an event LOG table, EVENTS are listed beside a TIME column. Each event corresponds to the point of time, accurately to the second, in which it took place.
The table contains precisely three weeks of continuous log.

I would like to learn how to query with the SQL count(*) statement for the following needs:

(1) In order to see a coarse event density trend for an average day, I
would like to count the events for each of the distinct twentyfour hours of an average day.

[Quoted] [Quoted] (2) Desirably, to sharpen the resolution and so to refine my analysis,
I would like to reduce the hourly intervals to a few minutes, say, sufficiently enough, 5 minutes.

[Quoted] (3) My next desired trend analysis would be to do the same for each
distinct day of the week, i.e. from Monday to Sunday.

[Quoted] [Quoted] (4) Finally, I would like to create another coarse, general daily
count, for the average week. This would obviously return just seven rows, one for each day of the week, from Monday to Sunday.

[Quoted] [Quoted] Any kind help would be greatly appreciated.

Thomas Received on Tue Oct 02 2001 - 13:19:20 CEST

Original text of this message