AnsweredAssumed Answered

sql query -pull data where resource allocated less than 5 days  for a given project in a current year

Question asked by sumit.butola on Oct 31, 2018
Latest reply on Nov 2, 2018 by sumit.butola

Hi,

 

I I am trying to write a query that will pull the details of resource who is allocated in a project less than 5 days. let suppose he is allocated to 3 projects. And in 1 project - he was just for 4 days. there we would be needing only the details related to that project information where he allocated to 4 not other projects.[valid to for current year only]

 

i tried...

 

select distinct srm_prj.name Project_Name,
srm.full_name Resource_Name,
prjbs_r.from_date From_Date,
prjbs_r.to_date To_Date
from prteam pr,
prj_blb_slices prjblbs,
prj_blb_slicerequests prjbs_r,
srm_projects srm_prj,
srm_resources srm,
inv_investments inv
where pr.prid = prjblbs.prj_object_id
and prjblbs.slice_request_id = prjbs_r.id
and prjblbs.slice_request_id = 5001001
and to_char(prjbs_r.from_date, 'YYYY') = to_char(sysdate, 'YYYY')
and pr.prprojectid = srm_prj.id
and pr.prresourceid = srm.id
and srm_prj.id = inv.id

-- and srm_prj.id = ''

 

After this, i am not sure how to implement that logic of allocation of project is lesser than 5.

someone can help me in this ?

 

thanks#

 

suhail-sayed

suhailsayed

Outcomes