Pursuing Guy's method in a non-procedural way:

select
    ts.timestamp,
    count(*)
from
    (
    select
        to_date('1-jan-2001','dd-mon-yyyy') +
        (rownum / 1440) timestamp
    from short_narrow_table_of_numbers
    where rownum <= 1440
    )    ts,
    phone_calls
where
    ts.timestamp between pc.start_date and pc.end_date
 and pc.start_date between
        to_date('1-jan-2001','dd-mon-yyyy')
        and
        to_date('2-jan-2001','dd-mon-yyyy')
group by
    ts.timestamp
;


Adjust constants to suit precision and resources.


Jonathan Lewis

Seminars on getting the best out of Oracle
Last few places available for Sept 10th/11th
See http://www.jlcomp.demon.co.uk/seminar.html




-----Original Message-----
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
Date: 15 August 2001 11:42


Quick and dirty solution:

Pick a time and look for all calls which started before that time and
ended after that time. That will tell you how many calls were in
progress at that time.

Repeat this at, say, half hour intervals, and graph the results. This
will show you a trend. Where it looks like a peak, try narrowing the
band of time you are looking at. Alternatively, use curve fitting to
find a peak value.

g


-----Original Message-----
Sent: Wednesday, August 15, 2001 11:21 AM
To: Multiple recipients of list ORACLE-L


Dear gurus !
I have a table of phone calls , 2 fields : CALL_START   DATE ,
CALL_END
DATE .
I need an SQL statement or a PL/SQL block to calculate the maximum
number of
SIMULTANIOUS phone conversations.
Please help !!!
Thanks a lot in advance !
Andrey.


--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Andrey Bronfin
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Guy Hammond
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jonathan Lewis
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to