超级麻蛋
超级麻蛋
全部文章
分类
归档
标签
去牛客网
登录
/
注册
超级麻蛋的博客
全部文章
(共9篇)
题解 | 每天的日活数及新用户占比
select df, count(distinct tb1.uid) dau, round( count(distinct tb2.uid) / count(distinct tb1.uid), 2 ) uv_new_ratio fro...
2025-03-10
0
65
题解 | 统计快递从创建订单到发出间隔时长
select round(avg(timestampdiff(minute,create_time,out_time)/60),3) as time from express_tb tb1 left join exp_action_tb tb2 on tb1.exp_numb...
2025-03-09
0
70
题解 | 统计快递运输时长
select exp_type, round(avg(timestampdiff(second,out_time,in_time)/3600),1) as time from express_tb tb1 left join exp_action_tb tb2 on ...
2025-03-09
0
70
题解 | 完成员工考核试卷突出的非领导员工
select emp_info.emp_id, emp_level, tag exam_tag from ( select ei.exam_id, tag, avg(score)...
2025-03-06
2
61
题解 | 淘宝店铺的实际销售额与客单价
select sum(pr) sales_total, sum(pr) / count(user_id) per_trans from (select user_id, sum(sales_num * goods_price) as pr ...
2025-03-06
0
80
题解 | 查询成绩
select count(*) from ( select a.sid, avg(score) avg from SC left join Student ...
2025-03-06
0
68
题解 | 支付间隔平均值
select cast(avg(abs(timestampdiff(second,od.logtime,se.logtime)))as signed) as gap from order_log as od left join select_log se on od.ord...
2025-03-05
0
60
题解 | 每天登陆最早的用户的内容喜好
排名存在并列情况,使用dense_rank() select log_day, tb1.user_id, hobby from ( select date (log_time) as log_day, u...
2025-03-05
18
68
题解 | 统计加班员工占比
select department, concat(round(sum(time) / count(sa.staff_id) * 100 ,1),'%') as ratio from ( select staff_id, ...
2025-03-05
0
66