DBA Data[Home] [Help]

VIEW: APPS.IMC_GROWTH_CHART_V

Source

View Text - Preformatted

SELECT a.month, a.month_no, a.p_party, to_char(round(a.p_party*100/c.p_tot,2)) p_party_pct from (select t.month, t.month_no, count(hp.party_id) p_party from imc_growth_parties_v hp, imc_growth_time_v t WHERE hp.creation_date(+) >= add_months(sysdate,-23) and t.month = hp.month(+) group by t.month, t.month_no) a, (select count(party_id) p_tot from imc_growth_parties_v hp) c where a.month_no in (3,6,9,12,15,18,21,24)
View Text - HTML Formatted

SELECT A.MONTH
, A.MONTH_NO
, A.P_PARTY
, TO_CHAR(ROUND(A.P_PARTY*100/C.P_TOT
, 2)) P_PARTY_PCT
FROM (SELECT T.MONTH
, T.MONTH_NO
, COUNT(HP.PARTY_ID) P_PARTY
FROM IMC_GROWTH_PARTIES_V HP
, IMC_GROWTH_TIME_V T
WHERE HP.CREATION_DATE(+) >= ADD_MONTHS(SYSDATE
, -23)
AND T.MONTH = HP.MONTH(+) GROUP BY T.MONTH
, T.MONTH_NO) A
, (SELECT COUNT(PARTY_ID) P_TOT
FROM IMC_GROWTH_PARTIES_V HP) C
WHERE A.MONTH_NO IN (3
, 6
, 9
, 12
, 15
, 18
, 21
, 24)