select cf stringvalue as inv COUNT AS count from jiraissue inner join

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
select
cf.stringvalue as "inv",
COUNT(*) AS 'count'
from jiraissue i
inner join project p on p.id=i.project
inner join issuestatus s on s.id=i.issuestatus
inner join customfieldvalue cf on cf.issue=i.id
where i.project=10212
and cf.customfield=10220
GROUP BY cf.stringvalue HAVING COUNT(*) > 1
;