Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 714783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:06:49+00:00 2026-05-14T05:06:49+00:00

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’)

  • 0
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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T05:06:49+00:00Added an answer on May 14, 2026 at 5:06 am

    you got adding b2.ALL_TASKS to the final group by, but you should use contemporary JOIN syntax as well as attempting to formatting it a little better:

    SELECT 
        SUM(a.Clicks) AS Clicks, SUM(b.NoOfUsers) Users,  c.WEEK_NUM, b2.ALL_TASKS  
        FROM (SELECT
                  SUM(CLICK_CNT) AS Clicks, RQST_DT AS DATEE 
                  FROM PER_DAY_USAGE    
                  GROUP BY RQST_DT
             ) a
            INNER JOIN  (SELECT
                             RQST_DT AS DATEEE, WEEK_NUM 
                             FROM TIMEDIM
                        ) c ON a.datee=c.dateee
            INNER JOIN  (SELECT
                             NoOfUsers, accDate 
                             FROM (
                                      (SELECT
                                           COUNT(DISTINCT RECEPIENT_ID) AS NoOfUsers,  ACTN_TAKE_DATA_TM AS accDate  
                                           FROM ALRT_HSTRY 
                                           WHERE ACTN_TAKE_CD is not null
                                           GROUP BY ACTN_TAKE_DATA_TM
                                      )
                                      UNION ALL
                                      (SELECT
                                           COUNT(DISTINCT RECEPIENT_ID) AS NoOfUsers,  ACTN_TAKE_DATA_TM AS accDate
                                           FROM PLATFORM_ALRT 
                                           WHERE ACTN_TAKE_CD is not null
                                           GROUP BY ACTN_TAKE_DATA_TM
                                      )
                                  )
                        ) b ON a.datee = b.accDate
            INNER JOIN  (SELECT
                             sum(TOTL_ALRT_CNT) ALL_TASKS,  CRTE_ON_DT AS DATEE  
                             from FEED_HSTRY 
                             where APPL_CD like '%' 
                             group by CRTE_ON_DT
                        ) b2 ON c.dateee=b2.DATEE
        GROUP BY c.WEEK_NUM, b2.ALL_TASKS 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

string queryString = SELECT SUM(skupaj_kalorij)as Skupaj_Kalorij + FROM (obroki_save LEFT JOIN users ON obroki_save.ID_uporabnika=users.ID)
SELECT sum(TotalHoursM) + (TotalHoursT) + (TotalHoursW) + (TotalHoursTH) + (TotalHoursF) AS TOTAL FROM LeaveRequest
SELECT SUM(bytes),stamp_updated from acct where stamp_updated BETWEEN datetime('now', 'localtime','-7 hours') AND datetime('now', 'localtime') GROUP
$query = SELECT sum(o.feeship) feeship_total, (SELECT SUM(p.products_price) FROM products p left join orders_products op
#travel expense = select sum(val) from expenses where type = 'travel'; #food expense =
I would like to do the following: SELECT sum(max(field-10,000,0)) from TABLE as in, I
I am trying to implement something like: Select thread from Thread where(Select Sum(thread.emails) from
If SELECT SUM(amount) FROM transactions ORDER BY order LIMIT 0, 50 sums the amount
I tried to do this: SELECT SUM(SUBTOTAL as TODAYSALES) FROM dbo.SALESORD_HDR where ORDERDATE >=41187
I have this query: SELECT p.text,se.name,s.sub_name,SUM((p.volume / (SELECT SUM(p.volume) FROM phrase p WHERE p.volume

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.