牛客987852806号
牛客987852806号
全部文章
分类
题解(45)
归档
标签
去牛客网
登录
/
注册
牛客987852806号的博客
全部文章
(共163篇)
题解 | #每个人的累计搜索点击数排名#
#要我说出题的人就有毛病,你直接说输出小于等于3的数值就完了,还在排名+1 我真是服了。 #我都不知道那边全了,是搜素的人多还是点击的人多,毕竟需要有可能有一边是空值,服了。 with tiaojian as ( select uid, count(query_kw) as search_num...
2024-02-27
0
254
题解 | #最近7天每天的人均停留时长和次均有效时长#
#题不难,让牛客表述的很难了就2点,1.求近7天的人均时长=总时长/总人数 2.次均有效时长=符合开始和结束时间大于等于3的总时长/ #符合开始和结束时间大于等于3的总时长 总人数 select dt, round( sum(diff)/count(distinct uid),1) as avg_...
Mysql
2024-02-27
0
276
题解 | #点击率排名与转化率排名差异#
with tiaojian as ( select uid, sum(is_click)/count(id) as ctr, sum(is_convert)/sum(is_click) as cvr, dense_rank()over(order by sum(is_convert)/sum(is...
2024-02-27
0
241
题解 | #各用户活跃分层人数统计#
with tiaojian as ( select t.id, t.uid, t.login_date, t.zj, t.zz, t.now_day, t.pt from( select id,uid, login_date, max(login_date)over(partition by u...
2024-02-27
0
273
题解 | #广告点击率排名#
with tiaojian as ( select t.uid, t.m from( select uid, count(rid) as cnt, rank()over(order by sum(is_click)/count(rid) desc,uid desc) as m from use...
2024-02-27
1
220
题解 | #统计最大连续登录天数区间#新手简单思路,容易理解
with tiaojian as ( select uid, login_date, row_number()over(partition by uid order by login_date asc) as m from user_login_tb group by uid,login_dat...
2024-02-26
0
286
题解 | #找出待召回的流失用户#小白简化写法
select uid, count(distinct login_date) as days, count(id) as times from user_login_tb group by uid having datediff((select max(login_date) from user_...
2024-02-26
0
227
题解 | #找出待召回的流失用户# 小白拆解做法
with tiaojian as ( select uid, count(id) as times from user_login_tb group by uid having count(id)>=3 ),tiaojian1 as ( select uid, count(distinct ...
2024-02-26
0
204
题解 | #日活次日留存率和新户次日留存率# 小白复杂写法
with date as ( select uid, min(login_date) as first_date from user_login_tb group by uid ),date1 as ( select uid, login_date from user_login_tb gro...
2024-02-23
0
205
题解 | #计算每天的新用户占比#
select t.login_date as dt, count(distinct uid) as total_user_num, concat( ifnull( round( ( sum(case when t.m=1 then 1 end)/count(distinct uid))*100,1)...
2024-02-23
1
269
首页
上一页
5
6
7
8
9
10
11
12
13
14
下一页
末页