Chueagle
Chueagle
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Chueagle的博客
全部文章
(共22篇)
题解 | 统计快递从创建订单到发出间隔时长
select round(avg(dt),3) as time from (select timestampdiff(minute,e1.create_time,e2.out_time)/60 as dt from express_tb e1 join exp_action_tb e2 on e1...
2025-09-29
0
16
题解 | 统计快递运输时长
with t as ( select *,timestampdiff(second,out_time,in_time)/3600 as date from exp_action_tb ) select e.exp_type,round(avg(date),1) as time fro...
2025-09-28
0
15
题解 | 淘宝店铺的实际销售额与客单价
with t1 as (select goods_id,sum(sales_num) as sn from sales_tb group by goods_id) select sum(sm) as sales_total,sum(sm)/(select count(distinct user_...
2025-09-28
0
19
题解 | 短视频直播间晚上11-12点之间各直播间的在线人数
select r.room_id,r.room_name,count(distinct u.user_id) as user_count from user_view_tb u join room_info_tb r on u.room_id=r.room_id where u.in_time &l...
2025-09-26
0
20
题解 | 网易云音乐推荐(网易校招笔试真题)
select music_name from (select distinct music_name,id from music where id in (select music_id from music_likes where user_id in (select follower_id fr...
2025-09-24
0
31
题解 | 支付间隔平均值
select CAST(AVG(dt) AS UNSIGNED) as gap from (select abs(timestampdiff(second,o.logtime,s.logtime)) as dt from order_log o join select_log s on o.orde...
2025-09-23
0
11
题解 | 统计加班员工占比
with at as (select staff_id,if(dt>9.5,1,0) as tmp from (select *,timestampdiff(second,first_clockin,last_clockin)/3600 as dt from attendent_tb)...
2025-09-22
0
24
题解 | 更新用户积分信息?
with t as ( select user_id,sum(order_price) as pr from order_tb where order_price>100 group by user_id ) select t.user_id,pr+p...
2025-09-20
0
11
题解 | 统计用户获得积分
select user_id,sum(po) as point from (select user_id,if(tmp>=1,tmp,0) as po from (select *,timestampdiff(minute,visit_time,leave_time) div 10 as t...
2025-09-20
0
23
题解 | 统计员工薪资扣除比例
select s.staff_id,st.staff_name,concat(round(s.dock_salary*100/s.normal_salary,1),'%') as dock_ratio from salary_tb s left join staff_tb st on s.staff...
2025-09-20
0
19
首页
上一页
1
2
3
下一页
末页