I'm on JIRA 7.2 with MySQL and need to write a SQL query for a Confluence macro and all I need to do is to get all the Epics from a specific project with a specific fixVersion but can't seem to grasp it.
Here's what I have so far, but it's returning all 429 Epics in the project, not just the 98 Epics in the project with fixVersion 'Twinkies'.
SELECT count(issuenum)
FROM jiraissue
join issuetype on jiraissue.issuetype=issuetype.ID
join projectversion on jiraissue.project=projectversion.project
where issuetype.id = 10001
and projectversion.project = 11604
and projectversion.vname = "Twinkies"