Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> query: "count" each minute between start/end
Hi there...
I have a table with access statistics with columns representing the [date] when a user first connected and the duration[seconds] they stayed.
For a graphical report I need to create a view which shows how many users were online each minute of the day, i.e. say we have this raw data:
user1: entered today, 9:30:17, stayed for 200 seconds (so he needs to be counted for 9:31, 9:32, 9:33 as he left 9:30:37). user2: entered today, 9:28:10, stayed for 180 seconds (so he needs to be counted for 9:29, 9:30, 9:31) and what I would like to get from this raw data is something like:
9:29, 1 9:30, 1 9:31, 2 9:32, 1 9:33, 1
thanks for all help,
N.
Received on Fri Jul 27 2007 - 15:58:34 CDT
![]() |
![]() |