ORACLE经典的SQL语句收录

select  任务人员,,任务名称,count(*) 工单数,sum(预计工时) 预计工时  from (
   select a.project_code,
   a.project_name,
   a.project_type_name,
   a.first_name 工单负责人,
   a.test_nane 测试负责人,
   i.value 任务名称,
   c.party_id,
   c.first_name 任务人员,
   b.expect_work_hour 预计工时,
   a.EXPECT_ONLINE_DATE 预计上线时间 ,
   b.expect_completion_date 预计完成时间, 
   b.actual_completion_date 实际完成时间
   from   
        (
                   select  b.project_code,b.project_name project_name ,e.project_type_name project_type_name,d.first_name first_name,b.project_status
                   ,b.expect_finish_date 预计完成时间,b.ACTUAL_FINISH_DATE 实际完成时间,A.EXPECT_ONLINE_DATE EXPECT_ONLINE_DATE,f.first_name test_nane
                   from estarcom.SH_MOBILE_PROJECT_EXT a,estarcom.sh_mobile_project b,estarcom.person d,estarcom.sh_mobile_project_type e,estarcom.person f
                    where( (a.EXPECT_ONLINE_DATE IS NOT NULL AND  a.EXPECT_ONLINE_DATE   between '2008-01-16' and '2008-01-24'  )
                    or   (a.EXPECT_ONLINE_DATE is null ))
                     and b.project_status<>'terminate'
                     and b.project_manager=d.party_id  and b.test_plan_assessor=f.party_id(+)
                     and b.project_type_id=e.project_type_id
                     and a.project_code=b.project_code
                         ) a,estarcom.sh_mobile_task b,estarcom.person c,estarcom.sh_mobile_properties i
                            where a.project_code=b.project_code
                        and i.value<>'模块自测'
                        and b.party_id=c.party_id
                        and i.group_id='TaskName' and b.task_code=i.code
                        and  b.actual_completion_date is  null
                        and to_char(b.expect_completion_date,'yyyy-mm-dd')  between '2008-01-16' and '2008-01-24'
                 --   and  (i.value='系统测试' or i.value='测试计划'or i.value='验证工单' or i.value='处理工单' )
                     --  and b.task_code like '%Test%'
                      -- and c.party_id like 'C%'
                       and   c.party_id in
                       ('YX0000','C10047','C10062','C10076','C10079','C10112','C10115',
                       'YX0011','YX0006','YX0078','YX0095','YX0311','C10046',
                       'C10044','YX0142','YX0295','YX0326','YX0329','YX0343','YX0351',
                       'C10040','YX0219')                      
                       --('YX0000','C10047','C10062','C10076','C10079','C10112','C10115')--rboss组
                        -- (''YX0011','YX0006','YX0078','YX0095','YX0311','C10046')--外围组
                       --  ('C10044','YX0142','YX0295','YX0326','YX0329','YX0343','YX0351')  --ccs组
                         --('C10040','YX0219')--计费组               
                        --and c.first_name like '%储%'             
                        order by  c.first_name,i.value
                    
    )
                    
 group by  任务人员 ,任务名称

你可能感兴趣的:(oracle,sql,Date,properties,mobile,任务)