Skip to content

Commit

Permalink
Merge pull request #109 from mozilla-services/incidents-view-group-by…
Browse files Browse the repository at this point in the history
…-deploy-id

Group by deploy_id in incidents view
  • Loading branch information
hackebrot authored Sep 13, 2024
2 parents 0b2dd66 + fbe610b commit 9fb792f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions queries/incidents.sql
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ SELECT
service_catalog.service,
incident_id,
root.environment as deployment_environment,
root.deploy_id,
MIN(IF(root.time_created < issue.time_created, root.time_created, issue.time_created)) AS time_created,
MAX(time_resolved) AS time_resolved,
ARRAY_AGG(root_cause IGNORE NULLS) AS changes,
Expand All @@ -80,7 +81,8 @@ LEFT JOIN (
time_created,
changes,
service,
environment
environment,
deploy_id
FROM
`four_keys.deployments` AS d,
d.changes
Expand All @@ -99,6 +101,7 @@ GROUP BY
2,
3,
4,
5
5,
6
HAVING
MAX(bug) IS TRUE ;

0 comments on commit 9fb792f

Please sign in to comment.