当前位置:网站首页>数分面试(一)----与业务相关
数分面试(一)----与业务相关
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`
+-------------------+---------+
边栏推荐
- 导火索:OAuth 2.0四种授权登录方式必读
- SD NAND Flash简介!
- js hijacks the array push method
- E-sports, convenience, efficiency, security, key words for OriginOS functions
- [Android]如何使用RecycleView in Kotlin project
- 项目成本控制如何帮助项目成功?
- leetcode: 529. Minesweeper Game
- 茄子科技CEO仇俊:以用户为中心,做用户真正需要的产品
- Qiu Jun, CEO of Eggplant Technology: Focus on users and make products that users really need
- Go编译原理系列6(类型检查)
猜你喜欢

mysql索引

七夕浪漫约会不加班,RPA机器人帮你搞定工作

Qiu Jun, CEO of Eggplant Technology: Focus on users and make products that users really need

Complete image segmentation efficiently based on MindSpore and realize Dice!

阿里顶级架构师多年总结的JVM宝典,哪里不会查哪里!

语音社交软件开发——充分发挥其价值

Microservice Technology Stack

项目成本控制如何帮助项目成功?

Custom filters and interceptors implement ThreadLocal thread closure

2022华数杯数学建模A题环形振荡器的优化设计思路思路代码分享
随机推荐
Huawei's lightweight neural network architecture GhostNet has been upgraded again, and G-GhostNet (IJCV22) has shown its talents on the GPU
Keil升级到AC6后,到底有哪些变化?
阿里全新推出:微服务突击手册,把所有操作都写出来了PDF
[Android]如何使用RecycleView in Kotlin project
正则表达式replaceAll()方法具有什么功能呢?
Jenkins manual (2) - software configuration
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
Oracle temporary table space role
High-quality DeFi application building guide to help developers enjoy DeFi Summer
ffmpeg drawtext 添加文本水印
【温度预警程序de开发】事件驱动模型实例运用
hcip BGP 增强实验
还在找网盘资源吗?快点收藏如下几个值得收藏的网盘资源搜索神器吧!
【 temperature warning program DE development 】 event driven model instance
七夕浪漫约会不加班,RPA机器人帮你搞定工作
linux下oracle常见操作以及日常积累知识点(函数、定时任务)
three objects are arranged in a spherical shape around the circumference
NowCoderTOP35-40——持续更新ing
How does the official account operate and maintain?Public account operation and maintenance professional team
Data Middle Office Construction (10): Data Security Management