当前位置:网站首页>Score interview (1)----related to business
Score interview (1)----related to business
2022-08-05 10:17:00 【go and be safe~】
In the interview process of data analysis, the question of user retention rate is often asked. This section will focus on explaining this problem. First, we must understand the definition of retention and know how to calculate retention.Let's start with a small case from the Internet.
Given the user_behavior table, ask to query the user retention rate for the next day, 7th and 30th.
First of all, what is the definition of retention?
It is now set that the first login time of a new user is the 0th day, the new user is defined as the user who logs in for the first time, and the code name of the login behavior is 1.
Next day retention rate: Among the new users on day 0, the number of users who still logged in on the first day after the new day / the total number of new users on day 0;
7-day retention rate: Day 0 new users, the number of users who are still logged in on the 7th day after the new day/ Day 0Add the total number of users;
30-day retention rate: In the new users on the 0th day, the number of users who are still logged in on the 30th day after the new day/Day 0>The total number of new users;
Note: Retention is generally a discrete concept and does not require users to log in every day for N days
- Select daily new users
- Lists the date each new user logged in for the first time and the dates they have logged in after that date
- Calculate the difference between the listed login dates. If there is a difference of 1 day, it means that the new user is still available for the next day. If there is a difference of 7 days, it means that the new user is still available for seven days, and so on
- Count the number of retained new users every day and calculate the retention rate
`user_behavior`
边栏推荐
- [Office] Collection of Microsoft Office download addresses (offline installation and download of Microsoft's official original version)
- Custom filters and interceptors implement ThreadLocal thread closure
- What is CRM Decision Analysis Management?
- 仿SBUS与串口数据固定转换
- 2022杭电多校 第6场 1008.Shinobu Loves Segment Tree 规律题
- Data Middle Office Construction (10): Data Security Management
- [Unity] [UGUI] [Display text on the screen]
- 微服务 技术栈
- 牛刀小试基本语法,Go lang1.18入门精炼教程,由白丁入鸿儒,go lang基本语法和变量的使用EP02
- Is digital transformation a business buy-in?
猜你喜欢
![[强网杯2022]WP-UM](/img/3d/caeab05ddca278af274dbf6e2f8ba1.png)
[强网杯2022]WP-UM

Tanabata romantic date without overtime, RPA robot helps you get the job done

What is CRM Decision Analysis Management?

微服务 技术栈

Oracle temporary table space role

Still looking for a network backup resources?Hurry up to collect the following network backup resource search artifact it is worth collecting!

Bias lock/light lock/heavy lock lock is healthier. How is locking and unlocking accomplished?

egg框架使用(二)

蚁剑webshell动态加密连接分析与实践

three.js调试工具dat.gui使用
随机推荐
入门 Polkadot 平行链开发,看这一篇就够了
企业的数字化转型到底是否可以买来?
Egg framework usage (1)
浅析WSGI协议
egg框架使用(二)
After Keil upgrades to AC6, what changes?
Voice-based social software development - making the most of its value
Bias lock/light lock/heavy lock lock is healthier. How is locking and unlocking accomplished?
ffmpeg drawtext add text watermark
linux下oracle常见操作以及日常积累知识点(函数、定时任务)
Oracle temporary table space role
Egg framework usage (2)
STM32+ULN2003 drives 28BYJ4 stepper motor (forward and reverse according to the number of turns)
The century-old Nordic luxury home appliance brand ASKO smart wine cabinet in the three-temperature area presents the Chinese Valentine’s Day, and tastes the love of the delicacy
技术干货 | 基于 MindSpore 实现图像分割之豪斯多夫距离
第八章:activiti多用户任务分配
Development common manual link sharing
【MindSpore Easy-Diantong Robot-01】You may have seen many knowledge quiz robots, but this one is a bit different
leetcode: 529. 扫雷游戏
第五章:activiti流程分流判断,判断走不同的任务节点