Here is a simple report to see the activity of a certain user in the system. We use this report for instance to verify that a staff member is using the system while on shift and get a sense of the kinds of things they are doing in the ticketing system. Note the comments and commented out code are everything between the /*XXXX*/


SELECT USER_NAME, TIMESTAMP, DESCRIPTION

FROM `ORG1`.`HD_TICKET_CHANGE`

LEFT JOIN USER UPDATER ON UPDATER.ID = USER_ID

WHERE USER_ID != 0

AND ((TIMESTAMP(TIMESTAMP) <= NOW() AND TIMESTAMP(TIMESTAMP) > DATE_SUB(NOW(),INTERVAL 1 MONTH))) /*CAN CHANGE TIMEFRAME*/

AND USER_NAME LIKE "%XXXXX%" /*INSERT USERNAME*/

/*And user_id = 123*/ /*OR USE USER ID FROM USERS https://YOURKBOX.HOST.NAME/adminui/user_list.php */

/* AND USER_ID != 123 AND USER_NAME NOT LIKE "%DONTWANT%" */ /*FILTERS FOR WHAT YOU DONT WANT*/

ORDER BY Timestamp DESC LIMIT 300;