Liumankit
Liumankit
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Liumankit的博客
全部文章
(共23篇)
题解 | 国庆期间每类视频点赞量和转发量
select tag, dt, like_cnt, retweet_cnt from ( select tag, date(start_time) as dt, sum(if_like) as like_perday, sum(if_retweet) as follow_perday, sum(s...
2025-08-11
0
23
题解 | 各城市最大同时等车人数
with table1 as( select a.city, date(a.event_time) as date_time, a.event_time as waited_start_time, case when order_id is null then end_time ...
2025-08-11
0
21
题解 | 每天的日活数及新用户占比
with early_enter_table as ( select uid,min(date(in_time)) as early_time from tb_user_log group by uid ) -- 最早进入系统的时间 , active_time_table ...
2025-08-11
0
19
题解 | 统计活跃间隔对用户分级结果
with judge_table as( select uid, TIMESTAMPDIFF(day,early_time,(select max(out_time) from tb_user_log)), TIMESTAMPDIFF(day,lately_time,(select max(out...
2025-08-10
0
26
简单易懂做法
select user_id,max(day_num) from ( select user_id,go_date,count(*) as day_num from (select user_id,sales_date, sales_date - rank() over(partition by u...
2025-08-09
0
24
题解 | 某宝店铺动销率与售罄率
-- 每个style_id的已经销售的数量/(每个style_id的库存量-已经销售的数量) -- 每个style_id的GMV(就是sum(sales_price))/(吊牌价*库存数量) with inventory_table as( select item_id,style_id, ...
2025-08-09
1
27
题解 | 牛客直播各科目同时在线人数
with status_table as ( select course_id,user_id,in_datetime as watchtime,1 as status from attend_tb union select course_id,user_id...
2025-08-09
0
29
题解 | 牛客直播各科目出勤率
with sign_table as( select course_id,course_name,sum(if_sign) as sign_num from behavior_tb left join course_tb using(course_id) group by c...
2025-08-09
0
27
题解 | 某乎问答最大连续回答问题天数大于等于3天的用户及其对应等级
select author_id,author_level,max(days) from( select author_id,flag,count(*) as days from ( select author_id, answer_date - rank() over(partition by a...
2025-08-09
0
38
题解 | 某乎问答单日回答问题数大于等于3个的所有用户
select answer_date, author_id, count(*) as answer_num from answer_tb group by answer_date,author_id having answer_num >= 3 order by answer_date,aut...
2025-08-08
0
17
首页
上一页
1
2
3
下一页
末页