/build/static/layout/Breadcrumb_cap_w.png

Simple report based on submitter

We need to create a simple report that shows the submitter of a ticket and how many tickets they have submitted. Our management wants to be able to distinguish our potential problem users.

Thanks


0 Comments   [ + ] Show comments

Answers (1)

Posted by: Jbr32 10 years ago
10th Degree Black Belt
0

Jay - give this a shot:

 

SELECT S.FULL_NAME AS SUBMITTER_NAME, COUNT(S.FULL_NAME) as COUNTED FROM HD_TICKET  LEFT JOIN USER S ON (S.ID = HD_TICKET.SUBMITTER_ID)  group by S.FULL_NAME ORDER BY COUNT(S.FULL_NAME) desc

Here is what it would like like in any mysql tool:

 

 

You may want to filter out "admin" you can do this via this query:

 

SELECT S.FULL_NAME AS SUBMITTER_NAME, COUNT(S.FULL_NAME) as COUNTED FROM HD_TICKET  LEFT JOIN USER S ON (S.ID = HD_TICKET.SUBMITTER_ID)  where S.FULL_NAME != "admin" group by S.FULL_NAME ORDER BY COUNT(S.FULL_NAME) desc

Comments:
  • I should point out the data above has been altered. We have developed a custom dashboard so the data shown above is anonymous from our system. From your system it should show the full name; e.g. Barker,Bob - Jbr32 10 years ago
  • If you wanted to see tickets created within the last 30 days by submitter you could use this:


    SELECT S.FULL_NAME AS SUBMITTER_NAME, COUNT( S.FULL_NAME ) AS COUNTED
    FROM HD_TICKET
    LEFT JOIN USER S ON ( S.ID = HD_TICKET.SUBMITTER_ID )
    WHERE S.FULL_NAME != "admin"
    AND HD_TICKET.CREATED >= ( CURDATE( ) - INTERVAL 30
    DAY )
    GROUP BY S.FULL_NAME
    ORDER BY COUNT( S.FULL_NAME ) DESC - Jbr32 10 years ago
    • Thanks! This is exactly what we were looking for. Having the interval will definitely help.
      Thanks again,

      Jay - jay.moore 10 years ago

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