zzzzzz123_
zzzzzz123_
全部文章
分类
归档
标签
去牛客网
登录
/
注册
zzzzzz123_的博客
全部文章
(共8篇)
题解 | 牛客每个人最近的登录日期(四)
select date, sum(n) new from( select date, if(date=m_d,1,0) n from login l join ( select user_id, min(date) m_d ...
2025-04-17
0
24
题解 | 最受欢迎的top3课程
select p.cid, count(p.id) pv, sum(timestampdiff(minute,start_time,end_time)) time_len from play_record_tb p left join course_info_tb c on ...
2025-03-24
0
39
题解 | 更新员工信息表
with tmp as( select EMPLOYEE_ID, UPDATE_DT, NEW_POSITION from( select EMPLOYEE_ID, rank() over(partition by EMPLOYEE_ID order by ...
2025-03-24
1
31
题解 | 未下单用户统计
SELECT cast(sum(if(order_id is null,1,0)) as signed) cnt FROM user_info u left join order_log o on u.uid=o.uid
2025-03-24
2
25
题解 | 商品id数据清洗统计
select distinct right(order_id,4) product_id, count(*) over(partition by right(order_id,4)) cnt from order_log order by cnt desc limit 1
2025-03-23
3
25
题解 | 查询订单
select order_id, customer_name, order_date from( select order_id, customer_name, order_date, rank() over(partition by cust...
2025-03-23
1
33
题解 | 每个城市中评分最高的司机信息
with tmp1 as( select city, driver_id, rank() over(partition by city order by avg_grade desc) rk, avg_grade from( select distinct c...
2025-03-22
0
31
题解 | 每个商品的销售总额
with tmp as( select sum(quantity) total_sales, category, name product_name, p.product_id id from products p j...
2025-02-13
1
42