Lateral
Lateral
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Lateral的博客
全部文章
(共146篇)
题解 | 网易云音乐推荐(网易校招笔试真题)
select t2.music_name from (select m.id, m.music_name from (select distinct music_id from music_likes where user_id in(select follower_id ...
2025-03-21
0
85
题解 | 支付间隔平均值
select cast(cast(avg(abs(timestampdiff(second,s.logtime,o.logtime)))as decimal(5,0))as unsigned) as gap from order_log o left join select_log s o...
2025-03-07
0
55
题解 | 每天登陆最早的用户的内容喜好
select t.log_day, t.user_id, t.hobby from (select date(l.log_time) as log_day, l.user_id, u.hobby, rank() over(partition by date(l.log_time) order by ...
2025-03-07
0
84
题解 | 统计加班员工占比
select t.department, concat(cast(sum(t.ifoverwork)*100/count(t.department) as decimal(5,1)),'%') as ratio from (select s.department, case when tim...
2025-03-07
0
56
题解 | 统计各个部门平均薪资
select t1.department, cast(avg(t2.normal_salary-t2.dock_salary) as decimal(10,3)) as avg_salary from staff_tb t1 left join salary_tb...
2025-03-04
0
67
题解 | 查询单日多次下订单的用户信息?
select date(o.order_time) as order_date, o.user_id, count(distinct o.order_time) as order_nums, u.vip from order_tb o left join ...
2025-03-04
0
89
题解 | 更新用户积分信息?
select t.user_id, t.newpoint+t.point as point from (select o.user_id, sum(o.order_price) as newpoint, u.point from order_tb o left ...
2025-03-04
0
65
题解 | 统计用户获得积分
select t.user_id, cast(sum(t.point) as decimal(3,0)) as point from (select user_id, case-----准确理解“每满10分钟获得1积分”的含义 when timestampdiff(minu...
2025-03-04
0
92
题解 | 统计员工薪资扣除比例
select st.staff_id, st.staff_name, concat(cast((sl.dock_salary*100/sl.normal_salary) as decimal(5,1)),'%') as dock_ratio from staff_tb st left join sa...
2025-03-04
0
64
题解 | 统计用户从访问到下单的转化率
select t1.date, concat(cast((t1.order_nums*100/t2.visit_nums) as decimal(5,1)),'%') as cr from (select date(v.visit_time) as date, count(dist...
2025-03-04
0
66
首页
上一页
6
7
8
9
10
11
12
13
14
15
下一页
末页