Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

SEE PBI-137119

https://dev.azure.com/transport-canada/DSD-CIVAV%20Support/_workitems/edit/137119

Run the following code in SQL Developer, TOAD, or DBEAVER, then export results to XLS

SELECT TO_CHAR(X.YEAR_CALENDAR_NBR) AS YR,
(SELECT COUNT(*) FROM M72_SDR WHERE
TO_NUMBER(SUBSTR(SDR_NUMBER_NUM,1,4)) = X.YEAR_CALENDAR_NBR) AS TOT,
(SELECT COUNT() FROM M72_SDR WHERE COUNTRY_CD = 'CF'
AND TO_NUMBER(SUBSTR(SDR_NUMBER_NUM,1,4)) = X.YEAR_CALENDAR_NBR) AS CF,
(SELECT COUNT() FROM M72_SDR WHERE COUNTRY_CD = 'AU'
AND TO_NUMBER(SUBSTR(SDR_NUMBER_NUM,1,4)) = X.YEAR_CALENDAR_NBR) AS AU,
(SELECT COUNT() FROM M72_SDR WHERE COUNTRY_CD = 'US'
AND TO_NUMBER(SUBSTR(SDR_NUMBER_NUM,1,4)) = X.YEAR_CALENDAR_NBR) AS US
FROM TR26_REPORTING_YEAR X
WHERE X.YEAR_CALENDAR_NBR BETWEEN 2016 AND 2021 ; /* 5-yr specified time period */

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.