Lateral
Lateral
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Lateral的博客
全部文章
(共102篇)
题解 | 查找当前薪水详情以及部门编号dept_no
select s.*, m.dept_no from dept_manager m left join salaries s on m.emp_no=s.emp_no order by s.emp_no asc
2025-04-02
0
43
题解 | 查找入职员工时间升序排名的情况下的倒数第三的员工所有信息
select a.emp_no, a.birth_date, a.first_name, a.last_name, a.gender, a.hire_date from ( select *, ...
2025-04-02
0
26
题解 | 更新员工信息表
select e.EMPLOYEE_ID, if(e.LAST_UPDATE_DT<=t1.LAST_UPDATE_DT,t1.POSITION,e.POSITION) as POSITION, if(e.LAST_UPDATE_DT<=t1.LAST_UPDATE_DT,t1.LAST...
2025-04-01
0
35
题解 | 未下单用户登陆渠道统计
select u.channel, count(*) as cnt from user_info u left join order_log o on u.uid=o.uid where o.order_id is null group by u.channel order by cnt desc,...
2025-04-01
0
39
题解 | 用户订单信息查询
select c.city, sum(o.total_amount) as total_order_amount from orders o left join customers c on o.customer_id=c.customer_id group by c.city order by t...
2025-04-01
0
39
题解 | 播放量峰值top3高的视频
select t.cid, max(t.cnt) as max_peak_uv from (select a.cid, sum(if(a.start_time between b.start_time and b.end_time,1,0)) ...
2025-04-01
0
31
题解 | 未下单用户统计
select count(distinct u.uid) as cnt from user_info u left join order_log o on u.uid=o.uid where o.order_id is null
2025-04-01
0
29
题解 | 返回顾客名称和相关订单号以及每个订单的总价
select c.cust_name, o.order_num, sum(i.quantity*i.item_price) as OrderTotal from OrderItems i left join Orders o on i.order...
2025-04-01
0
36
题解 | 每个顾客购买的最新产品名称
select t.customer_id, t.customer_name, t.product_name as latest_order from (select o.customer_id, c.customer_name, p.product_name, row_number() over(p...
2025-03-31
0
24
题解 | 各个部门实际平均薪资和男女员工实际平均薪资
with t as( select t2.department, t2.staff_gender, t1.normal_salary-t1.dock_salary as actual_salary from salary_tb t1 left join staff_tb t2 on t1.staff...
2025-03-25
0
36
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页