CREATE OR REPLACE VIEW ODP_SDDC_CR_ENG_VW AS
SELECT
    e.issue_key                                  AS epic_issue_key,
    e.summary                                    AS summary,
    COUNT(DISTINCT j.assignee_name)              AS engineer_count,
    TRUNC(
        NVL(e.resolution_date, SYSDATE)
        - e.created_date
    )                                            AS epic_days
FROM ODP_SDDC_CR_EPIC_VW e
LEFT JOIN ODP_SDDC_CR_JIRA_VW j
    ON j.epic_link = e.issue_key
GROUP BY
    e.issue_key,
    e.summary,
    e.created_date,
    e.resolution_date
ORDER BY
    summary DESC;