Mouse9610
Mouse9610
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Mouse9610的博客
全部文章
(共28篇)
题解 | 查询出不同类别商品中,销售金额排名前三且利润率超过 20%的商品信息
select product_id ,product_name ,category_id ,sales_amount ,profit_rate from (select t.product_id ,t.product_name ,t.category_id ,sum(t1.sales_amount)...
2025-10-22
0
11
题解 | 分析每个商品在不同时间段的销售情况
select t.product_id ,t.product_name ,sum(ifnull(t1.total_amount,0)) as q2_2024_sales_total ,row_number()over(partition by t.category order by sum(tota...
2025-10-17
0
15
题解 | 更新员工信息表
select EMPLOYEE_ID ,job as POSITION ,UPDATE_DT as LAST_UPDATE_DT from ( select EMPLOYEE_ID,job,UPDATE_DT,sheet,row_number()over(partition by employee_...
2025-10-17
0
16
题解 | 每个顾客购买的最新产品名称
select t.customer_id ,t1.customer_name ,t2.product_name as latest_order from orders t join customers t1 on t.customer_id=t1.customer_id join products ...
2025-10-17
0
17
题解 | 各个部门实际平均薪资和男女员工实际平均薪资
select department ,round(avg(avg_sal),2) as average_actual_salary ,IFNULL(ROUND(AVG(IF(staff_gender='male',avg_sal,NULL)),2),0.00) as average_actual_s...
2025-10-17
0
17
题解 | 用户购买次数前三
select uid ,count(*) as cnt from user_client_log t where step = 'order' group by uid limit 3
2025-10-16
0
18
题解 | 下单最多的商品
select t.product_id ,count(*) as cnt from product_info t left join user_client_log t1 on t.product_id=t1.product_id where t1.step='order' group by t.p...
2025-10-16
0
15
题解 | 统计快递从创建订单到发出间隔时长
select round(avg(TIMESTAMPDIFF(minute,create_time,out_time)/60),3) as time from express_tb t join exp_action_tb t1 on t.exp_number=t1.exp_number
2025-10-16
0
15
题解 | 统计快递运输时长
select exp_type ,round(avg(TIMESTAMPDIFF(MINUTE,t1.out_time,t1.in_time)/60),1) as time from express_tb t join exp_action_tb t1 on t.exp_number = t1.ex...
2025-10-16
0
15
题解 | 查询产生理赔费用的快递信息
select t.exp_number ,t.exp_type ,t1.claims_cost from express_tb t join exp_cost_tb t1 on t.exp_number=t1.exp_number where t1.claims_cost is not null o...
2025-10-16
0
13
首页
上一页
1
2
3
下一页
末页