Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL help
"ggstr" <gguerillot_at_freesurf.fr> wrote in message
news:8ssiq7$a7t$1_at_news6.isdnet.net...
| I have a table with 3 fields:
| eventnumber,object,date.
|
| I will wish to count the number of time that on a same object,time
between
| 2 eventnumber are inferior to a duration given (period).
select t1.object, count(*)
from mytable t1, mytable t2
where t1.object = t2.object
and t1.eventnumber >= min_en
and t2.eventnumber <= max_en
and (t1.date between min_date and max_date)
and (t2.date between min_date and max_date)
group by t1.object
-- ThomasReceived on Sun Oct 22 2000 - 16:17:59 CDT
![]() |
![]() |