FW: An SQL question , not easy ;-)

2001-08-15 Thread Greg Solomon
oops, should be > not < :o) select a.call_start, count(b.call_start) interruptions from phone_call a, phone_call b where a.call_start <= b.call_start and a.call_end > b.call_start group by a.call_start Cheers Greg -Original Message- Sent: 15 August 2001 15:43 To: '[EMAIL PROTECTED]'

Re: FW: An SQL question , not easy ;-)

2001-08-15 Thread Jan Pruner
1. Create table CC with 2 fields: DT DATE, CALL_COUNT NUMBER . 2. Fill table CC with tuples with DT started from MIN(CALL_START) up to MAX(CALL_END) and CALL_COUNT = 0. Step of DT value is 1 minute (or second = 36mil tuples/year). 3. for every tuple in a table of phone calls update table CC an

Re: FW: An SQL question , not easy ;-)

2001-08-15 Thread Jan Pruner
Give me some time :-))) Jan Pruner Dne st 15. srpen 2001 12:40 jste napsal(a): > 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 conver

FW: An SQL question , not easy ;-)

2001-08-15 Thread Andrey Bronfin
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. Consider there are 4 calls , one started at 12:10 and ended at 12:40