Hi All,

I have the below two SQL statements

SELECT EMP_CLASS_1
,SUM(TOT_MI/60) AS [Absent hours]

FROM [TestData].[dbo].[Absenteeism and SLWP TCS Data]
WHERE CODE = 'MLSKU' OR CODE = 'UNPDAB' OR CODE = 'UNPADH'
GROUP BY
EMP_CLASS_1
ORDER BY EMP_CLASS_1

and the second

SELECT EMP_CLASS_1
,SUM(TOT_MI/60) AS [Schedule Hours]

FROM [TestData].[dbo].[Absenteeism and SLWP TCS Data]
WHERE code = 'attend'
GROUP BY EMP_CLASS_1
ORDER BY EMP_CLASS_1

What I am trying to do is take the results from the first statement and divide by the results of the second statement.

So far I am not getting any luck.

I am very green at this so please be patient with me.

Thanks in advance for any help you can provide.