得芙
得芙
全部文章
分类
归档
标签
去牛客网
登录
/
注册
得芙的博客
全部文章
(共4篇)
题解 | 某宝店铺连续2天及以上购物的用户及其对应的天数
with t0 as ( select sales_date, user_id, dense_rank() over(partition by user_id order by sales_date) as ranking from ...
2025-10-11
0
28
题解 | 各城市最大同时等车人数
-- 自关联解决 with t_base as ( select t1.uid, date_format(t1.event_time,'%Y-%m-%d') as dt, -- 日期 t1.city, t1.event_tim...
2025-10-10
0
41
题解 | 小O的糖果
a = list(map(int,input().split())) b = list(map(int,input().split())) a_max = max(a) b_max = b[0]-b[1]+1 if a_max > b_max: print('YES') else: ...
2025-09-14
0
28
题解 | 2021年11月每天新用户的次日留存率
# 第四次 根据首次登陆时间 即最开始的first_time聚合,通过sum计算第二天活跃人数,通过count计算新用户总数(注意:由于第三次子查询已经对uid进行聚合了,所以此次不需要再使用distinct去重) select c.dt, round(sum(c.cnt)/count(c.u...
2025-04-23
0
71