3 queries found for "Pay Plan"
Get all from Pay Plan
select *
from CI_PP
uploaded by Nuno Rodrigues
Get specific Pay Plan
select *
from CI_PP
where
PP_ID = 'XXXX'
uploaded by Nuno Rodrigues
Retrieve number of Account Active and Broken Pay Plans in last 12 Months
SELECT PP.ACCT_ID, SUM((CASE WHEN PP.PP_STAT_FLG='20' THEN 1 ELSE 0 END)) ACTIVE_COUNT, SUM((CASE WHEN PP.PP_STAT_FLG='40' AND PP.START_DT>ADD_MONTHS(SYSDATE, -12)THEN 1 ELSE 0 END)) BROKEN_COUNT
FROM CI_PP PP
WHERE PP.ACCT_ID='XXX'
GROUP BY PP.ACCT_ID;
uploaded by Gunjan Sherathia