Fill data gaps - UNION, PARTITION BY, or JOIN?
- by Dave Jarvis
Problem
There are data gaps that need to be filled. Would like to avoid UNION or PARTITION BY if possible.
Query Statement
The select statement reads as follows:
SELECT
count( r.incident_id ) AS incident_tally,
r.severity_cd,
r.incident_typ_cd
FROM
report_vw r
GROUP BY
r.severity_cd, r.incident_typ_cd
ORDER BY
r.severity_cd,
…