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

  • Home
  • SEARCH
  • 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 655227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:34:51+00:00 2026-05-13T22:34:51+00:00

SELECT * FROM( (SELECT count(DISTINCT RECEPIENT_ID) as NoOfUsers, TO_CHAR(ACTN_TAKE_DATA_TM,’YYYY-MM-DD’) as accDate FROM ALRT_PLATFORM_ALRT_HSTRY where

  • 0
SELECT * FROM(
        (SELECT 
            count(DISTINCT RECEPIENT_ID) as NoOfUsers,
            TO_CHAR(ACTN_TAKE_DATA_TM,'YYYY-MM-DD') as accDate 
        FROM 
            ALRT_PLATFORM_ALRT_HSTRY  
        where 
            APPL_CD like 'EBP' and 
            ALRT_RSPNS_FROM_CLIENT_ID like 'BB' 
            group by TO_CHAR(ACTN_TAKE_DATA_TM,'YYYY-MM-DD')
        ) b,

        (SELECT 
            count(DISTINCT RECEPIENT_ID) as NoOfUsers, 
            TO_CHAR(ACTN_TAKE_DATA_TM,'YYYY-MM-DD') as accDate 
        FROM 
            ALRT_PLATFORM_ALRT 
        where 
            APPL_CD like 'EBP' and 
            ALRT_RSPNS_FROM_CLIENT_ID like 'BB' 
            group by TO_CHAR(ACTN_TAKE_DATA_TM,'YYYY-MM-DD')
        ) f   
        )

this query is returning the data in the following format:

NOOFUSERS              ACCDATE    NOOFUSERS              ACCDATE    
---------------------- ---------- ---------------------- ---------- 
2                      2009-12-21 1                      2010-03-01 
2                      2009-12-21 2                      2010-03-02 
2                      2009-12-21 1                      2010-03-03 
1                      2009-12-23 1                      2010-03-01 

is it possible to club the reuslt of two tables:
Am expecting the data to be in this format:

NOOFUSERS              ACCDATE    
---------------------- ---------- 
2                      2009-12-21 
1                      2009-12-23 
1                      2010-01-02 
1                      2010-01-04 //till here its table one data
1                      2010-03-01 //from here its table TWO data
2                      2010-03-02 
1                      2010-03-03 

Thank you 🙂

  • 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-13T22:34:51+00:00Added an answer on May 13, 2026 at 10:34 pm

    Using UNION ALL instead of subselected columns will append subsequent UNION ALL statements to the original select. Be wary you need the same amount of columns in each select statement.

    UNION ALL makes sure the combined result is not sorted/mingled (first query is returned before second). A regular UNION can/will mingle/mix/sort the result.

    SELECT 
                count(DISTINCT RECEPIENT_ID) as NoOfUsers,
                TO_CHAR(ACTN_TAKE_DATA_TM,'YYYY-MM-DD') as accDate 
            FROM 
                ALRT_PLATFORM_ALRT_HSTRY  
            where 
                APPL_CD like 'EBP' and 
                ALRT_RSPNS_FROM_CLIENT_ID like 'BB' 
                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 
                ALRT_PLATFORM_ALRT 
            where 
                APPL_CD like 'EBP' and 
                ALRT_RSPNS_FROM_CLIENT_ID like 'BB' 
                group by TO_CHAR(ACTN_TAKE_DATA_TM,'YYYY-MM-DD')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a mysql query like this: $topicreplycount = mysql_query('SELECT COUNT(DISTINCT post_msg_id) FROM phpbb_attachments
In a statement like this; $sql = SELECT distinct `term`,count(*) as count FROM {$temp_table_name}
I have the following query: SELECT DISTINCT w.name, count(*) FROM widgets AS w JOIN
I have something like this: SELECT id, fruit, pip FROM plant WHERE COUNT(*) =
SELECT postID, threadID, COUNT(DISTINCT postID) as count FROM wbb1_1_post post LEFT JOIN wcf1_user_to_groups groups
Is there a better way of doing a query like this: SELECT COUNT(*) FROM
SELECT person.id, person.name, COUNT(DISTINCT fruit.apple) AS Red Apple, fruit.* FROM (SELECT * FROM tree
I have to perform the following SQL query: select answer_nbr, count(distinct user_nbr) from tpoll_answer
I have a query: select a.kli, b.term_desc, count(distinct(a.adic)) as count, a.partner_id from ad_delivery.sgmt_kli_adic a
Example: select count(*) from my table where column1 is not null and (column1 =

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.