I need a query so i can find out how many issues have been created grouped by Issue Types and this is only in the last 12 months.
Example Output:
Issue Type A | 146
Issue Type B | 16
Issue Type C | 118
Thanks
I went searching myself and found the question but no reply. Better late than never.
This example is for SQL Server.
SELECT it.pname AS 'Issue Type', it.pstyle AS 'Type', COUNT(i.ID) AS 'Count'
FROM issuetype it
LEFT JOIN jiraissue i ON it.ID = i.issuetype
WHERE i.CREATED > dateadd(month,datediff(month,0,getdate())-12,0)
GROUP BY it.pname, it.pstyle
ORDER BY COUNT(i.ID) DESC
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.