d4x1 commented on issue #7766: URL: https://github.com/apache/incubator-devlake/issues/7766#issuecomment-2270356253
@Puvendhan Incidents which are related to deployments will be shown here. ``` _failure_caused_by_deployments as ( -- calculate the number of incidents caused by each deployment SELECT d.deployment_id, d.deployment_finished_date, count(distinct case when i.type = 'INCIDENT' then d.deployment_id else null end) as has_incident FROM _deployments d left join project_incident_deployment_relationships pim on d.deployment_id = pim.deployment_id left join issues i on pim.id = i.id GROUP BY 1,2 ) ``` Please make sure there are relations in table `project_incident_deployment_relationships`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@devlake.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org