Skip to main content

Number of tickets created by month - Community / DPQL Reports - Deskpro Support


Number of tickets created by month Report

The query below creates a count of tickets created by month and year:


SELECT DPQL_COUNT() AS 'Tickets Created'

FROM tickets

GROUP BY DPQL_ALIAS(DATE_FORMAT(tickets.date_created, '%Y-%M'), 'Date Created')

ORDER BY tickets.date_created


Note we're using  DATE_FORMAT to format the date the ticket was created so the count is per month. *

 We're also using  DPQL_ALIAS  to format the title of the group by column to 'Date Created': 

*  You  can format the date using standard MYSQL specifiers. There's a useful list of options from the site below: 




Add a comment

Please log in or register to submit a comment.

Need a password reminder?