select jiraissue.issuetype, component.cname, issuetype.pname,
jiraissue.issuestatus,issuestatus.pname, jiraissue.created,
CONCAT(monthname(jiraissue.created)," ",
year(jiraissue.created)) as monthyear,
jiraissue.RESOLUTIONDATE,
count(jiraissue.id), avg(DateDIFF(jiraissue.RESOLUTIONDATE,
jiraissue.created)) as days_to_close,
month(jiraissue.Created) as month
from project
join jiraissue ON project.id=jiraissue.project
join issuetype ON jiraissue.issuetype = issuetype.id
JOIN issuestatus ON jiraissue.issuestatus = issuestatus.id
left JOIN nodeassociation ON jiraissue.id = nodeassociation.source_node_id
left JOIN component ON nodeassociation.sink_node_id = component.id
where project.pkey='EWSMSP'
and jiraissue.RESOLUTIONDATE is not null
and jiraissue.created > {{since}}
and issuetype.pname in('Incident')
group by month
order by month
您可以看到第一个创建于3月31日,但在“月份”列中显示了4月。第三条记录也一样。