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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:27:03+00:00 2026-06-11T10:27:03+00:00

select retention , Sum(count(retention)) over(order by retention desc) as Num_Users_Retained from (select player_id ,

  • 0
select retention
 , Sum(count(retention)) over(order by retention desc) as Num_Users_Retained
  from (select player_id
         , round(init_dtime-create_dtime,0) as retention
      from player
     where Trunc(Create_Dtime) >= To_Date('2012-jan-01','yyyy-mon-dd')
       and init_dtime is not null)
  Group by retention
  order by retention

This query displays two columns: The first column being the day of this year(day 0 is jan-1,day 259 is today sep-16) and the second column being the retention. Day 0 has 428,000 because all users are retained, Day 1 has 300K (since 128K people didnt log in after their first day), and the number keeps decreasing as time goes on. I want to show another column for the percentages that each day is of day 0. Is that clear enough or should I provide further detail?

  • 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-11T10:27:04+00:00Added an answer on June 11, 2026 at 10:27 am
    select retention
         , Num_Users_Retained
         , round(Num_Users_Retained/max(Num_Users_Retained) over() * 100, 2) as perc
      from (select retention
                 , Sum(count(retention)) over(order by retention desc) as Num_Users_Retained
             from (select player_id
                        , round(init_dtime-create_dtime,0) as retention
                    from player
                   where Trunc(Create_Dtime) >= To_Date('2012-jan-01','yyyy-mon-dd')
                     and init_dtime is not null
                  )
            Group by retention
            order by retention)
     order by retention
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

select count(*) as count from table group by foreign_id order by count This returns
SELECT * FROM (SELECT ROW_NUMBER() OVER (ORDER BY hrl.Frn) as Row, hrl.unq, hrl.LcnsId, hc.Business,hc.Name,hc.Phone,
SELECT COUNT(*) FROM area WHERE ROUND(SQRT(POWER(('71' - coords_x), 2) + POWER(('97' - coords_y), 2)))
SELECT Id,Date,Name FROM people WHERE DATEPART(hh,Date) >= 7 AND DATEPART(hh,Date) <= 8 Order by
SELECT COUNT(id), AgeRange FROM ( select id, case when age < 0 then 'less
SELECT COUNT(*) FROM song AS s JOIN user AS u ON(u.user_id = s.user_id) WHERE
SELECT users.id, COUNT(?) FROM orders INNER JOIN users ON (orders.user_id = users.id) WHERE ??
select lastname, firstname from person group by lastname, firstname having 50 >= (select count(p.personid)
SELECT invoices.number_formatted, SUM(invoices_elements.netto) FROM invoices LEFT JOIN invoices_elements ON invoices_elements_code_invoices_id = invoices_id WHERE invoices_enable
SELECT `name` , COUNT(*) AS `count` FROM `t1`, `t2` WHERE `t2`.`id` = `t1`.`id` GROUP

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.