当前位置:网站首页>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`
边栏推荐
- Four years of weight loss record
- MySQL之数据视图
- FPGA:基础入门按键控制LED灯
- Qiu Jun, CEO of Eggplant Technology: Focus on users and make products that users really need
- 华为轻量级神经网络架构GhostNet再升级,GPU上大显身手的G-GhostNet(IJCV22)
- 【 temperature warning program DE development 】 event driven model instance
- What is the function of the regular expression replaceFirst() method?
- JS introduction to reverse the recycling business network of learning, simple encryption mobile phone number
- 【翻译】混沌网+SkyWalking:为混沌工程提供更好的可观察性
- static linking and dynamic linking
猜你喜欢
教你本地编译运行一个IDEA插件,在IDEA里聊天、下棋、斗地主!
深入理解 Istio 流量管理的超时时间设置
Advanced usage of C language
【MindSpore Easy-Diantong Robot-01】You may have seen many knowledge quiz robots, but this one is a bit different
入门 Polkadot 平行链开发,看这一篇就够了
dotnet OpenXML parsing PPT charts Getting started with area charts
IDEA performs the Test operation, resulting in duplicate data when data is inserted
19. Server-side session technology Session
SQL外连接之交集、并集、差集查询
我们的Web3创业项目,黄了
随机推荐
PCB布局必知必会:教你正确地布设运算放大器的电路板
【Unity】【UGUI】【在屏幕上显示文本】
MySQL transactions
多线程(进阶) - 2.5w字总结
ffmpeg drawtext 添加文本水印
蚁剑webshell动态加密连接分析与实践
技术干货 | 基于 MindSpore 实现图像分割之豪斯多夫距离
[Unity] [UGUI] [Display text on the screen]
【Office】Microsoft Office下载地址合集(微软官方原版离线安装下载)
仿SBUS与串口数据固定转换
第四章:activiti RuntimeService设置获和取流程变量,及与taskService的区别,开始和完成任务时设置流程变量[通俗易懂]
Introduction to SD NAND Flash!
IDEA performs the Test operation, resulting in duplicate data when data is inserted
JS introduction to reverse the recycling business network of learning, simple encryption mobile phone number
What is CRM Decision Analysis Management?
使用工具类把对象中的null值转换为空字符串(集合也可以使用)
Where is your most secretive personality?
第三章 : redis数据结构种类
第七章,activiti个人任务分配,动态指定和监听器指定任务委派人「建议收藏」
Analysis and practice of antjian webshell dynamic encrypted connection