/build/static/layout/Breadcrumb_cap_w.png

Only Select Specific Technicians on a Report

I have this as my SQL statement and it works great but can't seem to get it to work for just specific technicians

SELECT USER.USER_NAME as OWNER, count(HD_TICKET.ID) as NUMBER_OF_TICKETS,
ROUND((AVG(TIMESTAMPDIFF(DAY, 
                          HD_TICKET.CREATED, 
                          TIME_CLOSED)
           )), 1) AS "Avg Days Open"
from HD_TICKET
JOIN HD_STATUS on (HD_STATUS.ID = HD_TICKET.HD_STATUS_ID)
LEFT JOIN USER on (USER.ID = HD_TICKET.OWNER_ID)
where HD_STATUS.STATE ='closed'
and HD_TICKET.TIME_CLOSED > DATE_SUB(NOW(), INTERVAL 30 DAY)
and HD_TICKET.HD_QUEUE_ID in (1) /*add queue numbers here*/
GROUP BY OWNER

2 Comments   [ + ] Show comments
  • Hard code the names - scarpent 6 years ago
  • I have done this in the past for other reports but for some reason on this one I keep getting SQL error message with multiple names and if I use 1 name I get zero data - scarpent 6 years ago
    • Post your query that fails, please. - chucksteel 6 years ago

Answers (1)

Posted by: chucksteel 6 years ago
Red Belt
0
How do you want to select the technicians? It can be static and you can hard code the names, or you can use a label to make it dynamic.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ