how to pull a report on tickets 'created by ' ?
what sql detail collects this data, how do I create a report to get the CREATED BY info
2 Comments
[ + ] Show comments
Answers (1)
Answer Summary:
Please log in to answer
Posted by:
grayematter
8 years ago
Top Answer
You get the CREATED BY info from the HD_TICKET_CHANGE table, just filter on the description field as below. This should get you started.
SELECT
USER.USER_NAME,
COUNT(HD_TICKET_CHANGE.HD_TICKET_ID) AS count
FROM
HD_TICKET_CHANGE
INNER JOIN
USER ON USER.ID = HD_TICKET_CHANGE.USER_ID
WHERE
description LIKE 'Ticket Created%'
AND timestamp > DATE_SUB(NOW(), INTERVAL 7 DAY)
GROUP BY USER.USER_NAME
ORDER BY USER.USER_NAME
AND timestamp between '2016-10-3' and '2016-10-6'
The MySQL converts the dates to timestamps with the time portion 00:00:00. To include tickets on the 5th, you need to set the range through to 2016-10-6 00:00:00. - grayematter 8 years ago