what sql detail collects this data, how do I create a report to get the   CREATED BY  info
Answer Summary:
Cancel
2 Comments   [ + ] Show Comments

Comments

  • great !! works great... how do I specify a date range, like Monday oct 3rd thru the 5th ???
  • You would change the line referencing timestamp to something like

    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.
Please log in to comment

Answer Chosen by the Author

2

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
Answered 10/12/2016 by: grayematter
Fifth Degree Black Belt

Please log in to comment

Answers

Answer this question or Comment on this question for clarity