CREATE OR REPLACE VIEW ODP_SDDC_CR_JIRA_VW AS
SELECT
    ISSUE_KEY,
    ISSUE_ID,
    SUMMARY,
    COMPONENTS,
    STATUS,
    ASSIGNEE_USERNAME,
    ASSIGNEE_NAME,
    PRIORITY,
    CREATED_DATE,
    UPDATED_DATE,
    RESOLUTION_DATE,
    DUE_DATE,
    ISSUE_TYPE,
    CREATOR,
    REPORTER,
    DESCRIPTION,
    EPIC_LINK,
    EPIC_NAME,
    EPIC_STATUS,
    ENVIRONMENT,
    ROUND(NVL(RESOLUTION_DATE, SYSDATE) - CREATED_DATE) AS AVERAGE_DURATION
FROM
    SRC_ODP_SDDC_CR_TB
WHERE
    ISSUE_TYPE = 'SDDC Code Releas'
    AND CREATED_DATE > ADD_MONTHS(SYSDATE, -6);