Re: SELECT ... GROUP BY timerange?
Date: Fri, 13 Oct 2000 13:05:00 +0100
Message-ID: <NTCF5.7724$Bw1.4316_at_news.indigo.ie>
Hi try this
select
(floor((endtime- starttime)*24*60/10)*10) || ' - ' ||
((floor((endtime- starttime)*24*60/10)*10)+10) "duration in min" ,
count(*) "no of actions"
from table
group by
(floor((endtime- starttime)*24*60/10)*10) || ' - ' ||
((floor((endtime- starttime)*24*60/10)*10)+10)
/
HTH
Conan
Carsten Jacobs wrote in message <39E6EE58.8F46CD22_at_tool42.com>...
>
>Hi
>
>I have a table which stores an action_name, a starttime and an endtime
>
>What I want is a SELECT GROUP BY which shows something like
>
>duration in min no of actions
>---------------- -------
> 0-10 25
>10-20 30
>20-30 20
> . .
> . .
>
>
>Has anybody an idea how to do this? It must not look exactly like the
>example
>Any help is appreciated.
>Thanx
>
>Carsten
Received on Fri Oct 13 2000 - 14:05:00 CEST