当前位置:网站首页>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`
边栏推荐
- How can project cost control help project success?
- JS逆向入门学习之回收商网,手机号码简易加密解析
- 第四章:redis 数组结构的set和一些通用命令「建议收藏」
- 数分面试(一)----与业务相关
- Still looking for a network backup resources?Hurry up to collect the following network backup resource search artifact it is worth collecting!
- MySQL advanced (twenty-seven) database index principle
- IO stream articles -- based on io stream to realize folder copy (copy subfolders and files in subfolders) full of dry goods
- 【AGC】增长服务1-远程配置示例
- QSS 选择器
- 【翻译】混沌网+SkyWalking:为混沌工程提供更好的可观察性
猜你喜欢
七夕浪漫约会不加班,RPA机器人帮你搞定工作
egg框架使用(二)
Qiu Jun, CEO of Eggplant Technology: Focus on users and make products that users really need
高质量 DeFi 应用构建指南,助力开发者玩转 DeFi Summer
FPGA:开发环境Vivado的使用
The founder of the DFINITY Foundation talks about the ups and downs of the bear market, and where should DeFi projects go?
NowCoderTOP35-40——持续更新ing
单片机:温度控制DS18B20
电竞、便捷、高效、安全,盘点OriginOS功能的关键词
蚁剑webshell动态加密连接分析与实践
随机推荐
机器学习-基础知识 - Precision, Recall, Sensitivity, Specificity, Accuracy, FNR, FPR, TPR, TNR, F1 Score, Bal
还在找网盘资源吗?快点收藏如下几个值得收藏的网盘资源搜索神器吧!
阿里顶级架构师多年总结的JVM宝典,哪里不会查哪里!
数分面试(一)----与业务相关
用户考试分数大于单科科目平均分的查询
ffmpeg drawtext 添加文本水印
Bias lock/light lock/heavy lock lock is healthier. How is locking and unlocking accomplished?
攻防世界-PWN-new_easypwn
【Office】Microsoft Office下载地址合集(微软官方原版离线安装下载)
静态链接和动态链接
基于MindSpore高效完成图像分割,实现Dice!
Handwriting Currying - toString Comprehension
PCB布局必知必会:教你正确地布设运算放大器的电路板
5. Deploy the web project to the cloud server
High-quality DeFi application building guide to help developers enjoy DeFi Summer
SD NAND Flash简介!
【Unity】【UGUI】【在屏幕上显示文本】
How can project cost control help project success?
MySQL advanced (twenty-seven) database index principle
MySQL transactions