Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Query to find issue count by Issue Types between dates

Rob B
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 19, 2020

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

 

1 answer

0 votes
John Pisani July 12, 2022

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
atlassian, aafp, jira migration, marketing collaboration, end siloed work, streamline workflows, kerrie gottschalk, jira cloud admins, unified marketing, process visibility, team efficiency, cross-team collaboration

How Kerrie Gottschalk unified AAFP’s marketing team with Jira

At the American Academy of Family Physicians, siloed marketing teams faced delays and duplicate work. Kerrie Gottschalk shook things up by moving the department to Jira, streamlining processes, boosting visibility, and sparking stronger collaboration.

Read the story
AUG Leaders

Atlassian Community Events