/bundles/itninjaweb/img/Breadcrumb_cap_w.png

I would greatly appreciate it if you can help me with an SQL report that can list all submitters in order of the highest to lowest number of tickets submitted.

Thank you in advance.

1 Comment   [ - ] Hide Comment

Comments

  • Thank you five. I’ll give it a go.
Please log in to comment

Answer this question or Comment on this question for clarity

Answers

0
I believe this old answer would suffice.

Just comment out the where date line and it'll show them all and add an order by at the end, like so:
SELECT U.FULL_NAME AS 'Full Name', U.USER_NAME AS 'Username', COUNT(*) AS 'Number of Tickets'
FROM HD_TICKET T LEFT JOIN USER U ON T.SUBMITTER_ID = U.ID
/* WHERE DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= T.CREATED */
GROUP BY U.USER_NAME
ORDER BY COUNT(*) DESC

Answered 01/09/2018 by: five.
Second Degree Blue Belt

Please log in to comment