Hi - I have to separate jobs but I want to sum the total minutes spent for both jobs, the D1_Factor_PC is different for the 2 jobs my query is returning me 2 rows instead of one can anyone help please?
SELECT SUM(dbo.tbl_Daily_Timesheet.EffectiveMinutes * D1_Factor_PC)/100 [Personal Needs RECOVERY]
FROM dbo.tbl_Daily_Timesheet
INNER JOIN dbo.tbl_Job_D1_Factors ON dbo.tbl_Daily_Timesheet.WorkstudyCode = dbo.tbl_Job_D1_Factors.Job_Code
INNER JOIN dbo.tbl_D1_Factors ON dbo.tbl_Job_D1_Factors.D1_Factor_ID = dbo.tbl_D1_Factors.D1_Factor_ID
WHERE tbl_Job_D1_Factors.D1_Factor_ID = '1' --Personal Needs
GROUP BY dbo.tbl_Daily_Timesheet.EffectiveMinutes
,dbo.tbl_Job_D1_Factors.D1_Factor_PC