Re: SELECT ... GROUP BY timerange?

From: Valgaeren Dirk <DValgaeren_at_Cereus.BE>
Date: Fri, 13 Oct 2000 14:10:13 +0200
Message-ID: <8s6u14$54b$1_at_naxos.belnet.be>


try the following :
select round(endtime-starttime,-1) "duration in min" , count(*) "no of actions"
from table_name
group by round(endtime-starttime,-1) ;

-1 : eg 16 becomes 20
-2: eg 76 becomes 100

Carsten Jacobs <carsten.jacobs_at_tool42.com> schreef in berichtnieuws 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:10:13 CEST

Original text of this message