刷牛客的coder很爱吃香菜
刷牛客的coder很爱吃香菜
全部文章
分类
归档
标签
去牛客网
登录
/
注册
刷牛客的coder很爱吃香菜的博客
全部文章
(共22篇)
题解 | 商品销售总额分布
select case when pay_method = '' then 'error' else pay_method end as pm, count(1) cnt from user_client_log u left ...
2025-02-13
0
41
题解 | 商品销售排名
-- 各商品销售数量 with t1 as ( select product_id, sum( case when step = 'select' ...
2025-02-13
0
55
题解 | 商品价格排名
with t1 as ( select *, dense_rank() over ( partition by type o...
2025-02-13
0
65
题解 | 下单最多的商品
select product_id, sum( case when step = 'order' then 1 else 0 end ) cnt from user_client_log ...
2025-02-13
0
60
题解 | 统计快递运输时长
-- 按快递种类聚合前各快递的运输时长(关联查询,时间函数)with t1 as ( select exp_type, timestampdiff (second, out_time, in_time) / 3600 ys_time ...
2025-02-13
0
56
题解 | 完成员工考核试卷突出的非领导员工
with -- exam_record为主表,join余下两张表,得出用户作答时长 t1 as ( select e.emp_id, e.exam_id, emp_level, t...
2025-02-13
0
52
题解 | 淘宝店铺的实际销售额与客单价
with t1 as ( select user_id, sales_num * goods_price sales from sales_tb s left jo...
2025-02-13
0
54
题解 | 短视频直播间晚上11-12点之间各直播间的在线人数
select uv.room_id, room_name, count(distinct user_id) user_count from user_view_tb uv join room_info_tb rit on uv.room_id = rit.ro...
2025-02-13
1
52
题解 | 被重复观看次数最多的3个视频
-- 第一步:统计每个用户对每个课程的观看次数 WITH user_course_views AS ( SELECT pr.cid, pr.uid, COUNT(*) AS view_count ...
2025-02-13
5
56
题解 | 请写出计算粉丝ctr的sql语句
select sum(read_num) / sum(show_num) fans_ctr from c join b on c.content_id = b.content_id where (author_id, fans_id) in ( sel...
2025-02-13
1
63
首页
上一页
1
2
3
下一页
末页