oracle - Find max number of open tasks -


what attempting find out max number of tasks may receive on day during next 6 months.

for example

task 1 runs 1-jan-16 , ends 10-jan-16 task 2 runs 3-jan-16 , ends 15-jan-16 task 3 runs 6-jan-16 , ends 10-jan-16 task 4 runs 9-jan-16 , ends 20-jan-16 

so in example there 4 tasks open between 1-jan , 10th jan want outcome 4 in scenario. reason being i'm displaying them in gantt chart they'll underneath each other.

all have work far is:

    select schedule_start_date,am.ac,count(wo)  ac_master left outer join wo on wo.ac = am.ac , ac_type = '190' wo.status = 'open' group am.ac,schedule_start_date 

this show count per day of these may overlap.

is there anyway trying accomplish?

if want count each scheduled group @ given point in time, can use between start , end dates:

select schedule_start_date,        am.ac,        count(*) thecount ac_master left outer join wo     on wo.ac = am.ac ,        ac_type = '190' wo.status = 'open' ,       '2016-01-10' between schedule_start_date , schedule_end_date group schedule_start_date,          am.ac 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -