SELECT mil.mil_name, count(1) as CNT FROM SCH , OSI, MIL, STA, TOS, PKG
WHERE SCH.SCH_KEY =OSI.SCH_KEY
AND OSI.MIL_KEY =MIL.MIL_KEY
AND SCH.SCH_STATUS =STA.STA_STATUS
AND PKG.PKG_KEY = OSI.PKG_KEY
AND MIL.TOS_KEY =TOS.TOS_KEY
AND PKG.PKG_KEY =TOS.PKG_KEY
AND PKG.PKG_TYPE = 'Provisioning'
AND STA.STA_BUCKET = 'Rejected' --//'Pending'
and TO_CHAR(SCH.SCH_CREATE, 'YYYYMMDD') <= '20160406' group by mil.mil_name order by CNT desc;
Ex:
WHERE SCH.SCH_KEY =OSI.SCH_KEY
AND OSI.MIL_KEY =MIL.MIL_KEY
AND SCH.SCH_STATUS =STA.STA_STATUS
AND PKG.PKG_KEY = OSI.PKG_KEY
AND MIL.TOS_KEY =TOS.TOS_KEY
AND PKG.PKG_KEY =TOS.PKG_KEY
AND PKG.PKG_TYPE = 'Provisioning'
AND STA.STA_BUCKET = 'Rejected' --//'Pending'
and TO_CHAR(SCH.SCH_CREATE, 'YYYYMMDD') <= '20160406' group by mil.mil_name order by CNT desc;
Ex:
Create User | 9714 |
EASExpirationDate Updated | 9296 |
Disable User | 8715 |
expirationDate Updated | 6495 |
No comments:
Post a Comment