lizhenzhen
lizhenzhen
全部文章
分类
归档
标签
去牛客网
登录
/
注册
lizhenzhen的博客
全部文章
(共65篇)
题解 | 商品id数据清洗统计
select substring_index(order_id,'_',-1) as product_id, count(*) as cnt from order_log group by product_id order by product_id,cnt desc limit 1...
2025-12-04
1
19
题解 | 查询订单
select order_id, customer_name, order_date from (select *, row_number() over(partition by customer_id order by order_date desc) ...
2025-12-04
1
19
题解 | 每个部门薪资排名前两名员工
select department, employee_name, salary from (select *, row_number() over(partition by department order by salary desc) as ...
2025-12-04
1
23
题解 | 每个客户的账户总金额
select customer_id, sum(balance) as sum_balance from account group by customer_id order by sum_balance desc,customer_id;
2025-12-04
2
18
题解 | 商品销售总额分布
select if(pay_method='','error',pay_method) as pay_method, count(*) as cnt from user_client_log u join product_info p on u.product_id=p.produ...
2025-12-04
2
22
题解 | 商品销售排名
select product_name, price*cnt as price from (select product_id,count(distinct trace_id) as cnt from user_client_log where pay_me...
2025-12-04
1
20
题解 | 商品价格排名
select product_id, product_name, type, price from( select *, dense_rank() over(partition by type order by pric...
2025-12-04
1
20
题解 | 用户购买次数前三
select uid, count(*) as cnt from user_client_log where step='order' group by uid order by cnt desc,uid limit 3;
2025-12-04
2
19
题解 | 下单最多的商品
select product_id, count(distinct trace_id) as cnt from user_client_log where step='order' group by product_id order by product_id,cnt desc l...
2025-12-04
1
22
题解 | 统计快递从创建订单到发出间隔时长
select round(avg(timestampdiff(minute,create_time,out_time)/60),3) as time from exp_action_tb e1 join express_tb e2 on e1.exp_number=e2.exp_numbe...
2025-12-04
1
24
首页
上一页
1
2
3
4
5
6
7
下一页
末页