牛客987852806号
牛客987852806号
全部文章
分类
题解(45)
归档
标签
去牛客网
登录
/
注册
牛客987852806号的博客
全部文章
(共163篇)
题解 | 各个视频的平均完播率
select tg.video_id, round( avg(case when timestampdiff(second,start_time,end_time)>=duration then 1 else 0 end),3) as avg_comp_play_rate from tb_u...
2025-03-21
0
34
题解 | 试卷发布当天作答人数和平均分
with tiaojian as ( select uid from user_info where level>5 ),tiaojian1 as ( select exam_id, release_time from examination_info where tag="SQ...
2025-03-18
0
43
题解 | 月均完成试卷数不小于3的用户爱作答的类别
with tiaojian as ( select uid from exam_record group by uid having count(submit_time)/count(distinct month(submit_time))>=3 ) select tag, count(...
2025-03-18
0
52
题解 | 查询连续登陆的用户
with tiaojian as ( select user_id, date(log_time) as pday, row_number()over(partition by user_id order by date(log_time) ) as py from login_tb ),tiao...
2025-03-10
0
33
题解 | 商品销售总额分布
select case when pay_method="" then "error" else pay_method end as py, count(pay_method) as cnt from user_client_log lg left join ...
2025-02-21
0
48
题解 | 商品销售排名
with tiaojian as ( select lg.product_id, type, product_name, sum(price) as py, dense_rank()over(order by sum(price) desc,product_name asc) as pdiff f...
2025-02-21
1
48
题解 | 商品价格排名
#1.先求出每个商品类型的价格的前2名的商品。 #2.在将上述的商品在进行个排序,取前三。 with tiaojian as ( select product_id, product_name, type, price, dense_rank()over(partition by type orde...
2025-02-21
0
73
题解 | 用户购买次数前三
select uid, cnt from( select uid, count(distinct trace_id) as cnt, row_number()over(order by count(distinct trace_id) desc,uid) as pdiff from user_cl...
2025-02-21
1
47
题解 | 下单最多的商品
select t1.product_id, pdiff as cnt from( select product_id, pdiff, dense_rank()over(order by pdiff desc,product_id asc) as py from( select product_...
2025-02-20
0
67
题解 | 完成员工考核试卷突出的非领导员工
with tiaojian as ( select ed.emp_id, eo.exam_id, emp_level, eo.tag, ed.score, timestampdiff(minute,start_time,submit_time) as pt, avg(score)over(part...
2025-02-20
0
48
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页