select Emply, DeptID, HTIME as Billable_Hours
from CDTIME
where emply_status = 'F'
and DATEWORKED between '01/01/2018' and '07/31/2018'
pivot
(
sum(HTime)) As PivotTable ......
I'm stuck at the end, I would like my data to display i.e.
AAA 001 50
AAA 002 10
AAA 003 20
Total AAA 80
BBB 999 20
BBB 004 15
BBB 005 75
Total BBB 105