Kace - Service Desk Report for Quarterly Hours Worked for a Department
02/06/2018 1303 views
I'm new to SQL queries and was messing around with a query i found searching for "Kace Hours Worked". Basically i was trying to pull data from the HD_Ticket table and join HD_Work so i can get data to return by Ticket ID, Ticket Title, Date, Submitter, Owner, and Department. We need a way to record quarterly billing hours for a certain department to get reimbursement. I tried pulling the info i needed from the Kace Report Wizard but had no luck finding work hours to associate with it.
This is the query i was messing with:
SELECT W.STOP as Date, W.HD_TICKET_ID as TicketID, SUM(W.ADJUSTMENT_HOURS) as HoursWorked, USER.FULL_NAME as Owner, HD_TICKET.CUSTOM_FIELD_VALUE0 as Department
FROM ORG1.HD_TICKET W
JOIN HD_Work on W.Work_ID = Work.ID
WHERE W.STOP > DATE_SUB(NOW(), INTERVAL 91.25 DAY)
and HD_TICKET.CUSTOM_FIELD_VALUE0 = 'Department Name'
GROUP BY W.HD_TICKET_ID
Any Help would be greatly appreciated.