SELECT SUM(a.Clicks) AS Clicks, SUM(b.NoOfUsers) Users, c.WEEK_NUM, b2.ALL_TASKS FROM
(SELECT SUM(CLICK_CNT) AS Clicks, TO_CHAR(RQST_DT,'YYYY-MM-DD') AS DATEE FROM PER_DAY_USAGE GROUP BY RQST_DT) a,
(SELECT TO_CHAR(RQST_DT,'YYYY-MM-DD') AS DATEEE, WEEK_NUM FROM TIMEDIM) c,
(SELECT NoOfUsers, accDate FROM (( SELECT COUNT(DISTINCT RECEPIENT_ID) AS NoOfUsers, TO_CHAR(ACTN_TAKE_DATA_TM,'YYYY-MM-DD') AS accDate FROM ALRT_HSTRY WHERE ACTN_TAKE_CD is not null GROUP BY TO_CHAR(ACTN_TAKE_DATA_TM,'YYYY-MM-DD')) UNION ALL ( SELECT COUNT(DISTINCT RECEPIENT_ID) AS NoOfUsers, TO_CHAR(ACTN_TAKE_DATA_TM,'YYYY-MM-DD') AS accDate FROM PLATFORM_ALRT WHERE ACTN_TAKE_CD is not null GROUP BY TO_CHAR(ACTN_TAKE_DATA_TM,'YYYY-MM-DD'))) ) b,
( select sum(TOTL_ALRT_CNT) ALL_TASKS, TO_CHAR(CRTE_ON_DT,'YYYY-MM-DD') AS DATEE from FEED_HSTRY where APPL_CD like '%' group by CRTE_ON_DT)b2
WHERE a.datee = b.accDate AND a.datee=c.dateee AND b2.DATEE = c.dateee GROUP BY c.WEEK_NUM
its the problem with b2.ALL_TASKS ALL_TASKS
. If I remove that from SELECT its working.