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 8563607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:59:52+00:00 2026-06-11T16:59:52+00:00

I have two querys: Select trunc(create_dtime) as Day, Count(Player_Id) as New_Users From Player Where

  • 0

I have two querys:

Select trunc(create_dtime) as Day, Count(Player_Id) as New_Users
From Player
Where Trunc(Create_Dtime) >= To_Date('2012-Jan-01','yyyy-mon-dd')
Group By Trunc(Create_Dtime)

and

Select trunc(create_dtime) as Day,Count(Player_Id) as Retained_Users
From Player
Where Trunc(Create_Dtime) >= To_Date('2012-Jan-01','yyyy-mon-dd')
And Trunc(Init_Dtime)  >= Trunc(Sysdate) - 7
Group By Trunc(Create_Dtime)
Order By Day Asc

Every day has a value, and I want to join these two queries together so I only have one query instead of two.

  • 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-06-11T16:59:53+00:00Added an answer on June 11, 2026 at 4:59 pm

    You shouldn’t need a join there:

    SELECT
      TRUNC(CREATE_DTIME) AS DAY,
      COUNT(PLAYER_ID) AS NEW_USERS,
      COUNT(CASE WHEN TRUNC(INIT_DTIME) >= TRUNC(SYSDATE) - 7 THEN PLAYER_ID ELSE NULL END)     AS RETAINED_USERS
    FROM PLAYER
    WHERE TRUNC(CREATE_DTIME) >= TO_DATE('2012-Jan-01','yyyy-mon-dd')
    GROUP BY TRUNC(CREATE_DTIME)
    ORDER BY 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following queries: Select TRUNC(create_dtime) as Day, Count(Create_Dtime) As SinS_Tot From player_chkin_hist
i have two queries select * from T where DATE_OF between to_date ('01.02.2012 00:00:00',
I have two querys: SELECT LancamentoEntrada.*, TipoEntrada.descricao AS nome, Usuario.nome AS obreiro FROM lancamento_entradas
I have two querys below, both of which are feeding from the same "player"
I have the following query: SELECT location, step, COUNT(*), AVG(foo), YEAR(start), MONTH(start), DAY(start) FROM
I have this query below: Select count(CDT) as Actions From Player_Tapjoy Where Trunc(CDT) >=
I have a query to select from another sub-query select. While the two queries
I have the query to select some columns from two tables, which must contain
I have two tables which I need to select all rows from where the
I have two MYSQL queries as follows: $anchors = mysql_query(SELECT * FROM anchors WHERE

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.