当前位置:网站首页>数分面试(一)----与业务相关
数分面试(一)----与业务相关
2022-08-05 10:10:00 【且行且安~】
在数据分析的面试过程中,常常会被问到求用户留存率的问题,本小节将会重点针对该问题进行讲解,首先我们得明白留存的定义,知道留存如何计算。先以网上一个小案例来进行讲解。
给定user_behavior表,要求查询次日,7日和30日用户留存率。
首先需要弄明白,留存的定义是什么?
现定为新用户第一次登录时间为第0天,新用户定义为第一次登录的用户,登录行为的代号为1。
次日留存率:第0天新增用户中,新增日之后的第1天还登录的用户数 / 第0天新增总用户数;
7日留存率:第0天新增用户中,新增日之后的第7天还登录的用户数 / 第0天新增总用户数;
30日留存率:第0天新增的用户中,新增日之后的第30天还登录的用户数 / 第0天新增总用户数;
注意:留存一般是离散的概念,不要求用户在N天内每天都登录
- 摘选出每天的新用户
- 列出每个新用户第一次登录的日期及此日期之后仍登录的日期
- 计算列出的登录日期之间的差值,如果相差1天,说明该新用户次日仍留存,如果相差7天,说明该新用户七日仍留存,以此类推
- 统计每天新用户的留存人数以及计算留存率
`user_behavior`
+-------------------+---------+
边栏推荐
- The founder of the DFINITY Foundation talks about the ups and downs of the bear market, and where should DeFi projects go?
- ffmpeg drawtext add text watermark
- JS逆向入门学习之回收商网,手机号码简易加密解析
- 浅析WSGI协议
- Jenkins使用手册(2) —— 软件配置
- JS introduction to reverse the recycling business network of learning, simple encryption mobile phone number
- Microservice Technology Stack
- uniapp 连接ibeacon
- 导火索:OAuth 2.0四种授权登录方式必读
- Where is your most secretive personality?
猜你喜欢
three物体围绕一周呈球形排列
多线程(进阶) - 2.5w字总结
偏向锁/轻量锁/重级锁锁锁更健康,上锁解锁到底是怎么完成实现的
E-sports, convenience, efficiency, security, key words for OriginOS functions
NowCoderTOP35-40 - continuous update ing
Oracle temporary table space role
JS introduction to reverse the recycling business network of learning, simple encryption mobile phone number
How can project cost control help project success?
Egg framework usage (2)
5. Deploy the web project to the cloud server
随机推荐
【MindSpore易点通机器人-01】你也许见过很多知识问答机器人,但这个有点不一样
What is CRM Decision Analysis Management?
SD NAND Flash简介!
PHP 操作mangoDb
hcip BGP enhancement experiment
微服务 技术栈
阿里顶级架构师多年总结的JVM宝典,哪里不会查哪里!
5.部署web项目到云服务器
Advanced usage of C language
three.js调试工具dat.gui使用
IDEA执行Test操作导致数据插入时出现了重复数据
three objects are arranged in a spherical shape around the circumference
数据中台建设(十):数据安全管理
Technical dry goods | Hausdorff distance for image segmentation based on MindSpore
Our Web3 Entrepreneurship Project, Yellow
偏向锁/轻量锁/重级锁锁锁更健康,上锁解锁到底是怎么完成实现的
导火索:OAuth 2.0四种授权登录方式必读
E-sports, convenience, efficiency, security, key words for OriginOS functions
RT-Thread记录(一、RT-Thread 版本、RT-Thread Studio开发环境 及 配合CubeMX开发快速上手)
STM32+ULN2003 drives 28BYJ4 stepper motor (forward and reverse according to the number of turns)