今天也要早睡1
今天也要早睡1
全部文章
分类
归档
标签
去牛客网
登录
/
注册
今天也要早睡1的博客
全部文章
(共19篇)
题解 | 给出employees表中排名为奇数行的first_name
select first_name as first from (select *,row_number() over(order by first_name) as rk1 from employees order by first_name) as temp where rk1 % 2 != 0...
2025-10-25
0
27
题解 | 每个月Top3的周杰伦歌曲
select * from (select month(fdate) as month,row_number()over(partition by month(fdate) order by count(song_id) desc) as ranking,song_name,count(song_i...
2025-08-23
0
34
题解 | 物流公司想要分析快递小哥的薪资构成和绩效情况
select courier_id,courier_name,(base_salary+sum(delivery_fee)-sum_expense_amount) as total_income from couriers_info c join deliveries_info d using(co...
2025-08-15
0
58
题解 | 查询出每个品牌在特定时间段内的退货率以及平均客户满意度评分
select brand_id,brand_name,round(count(if(return_status = 1,1,null))/count(return_status),2) as return_rate_July_2024,round(avg(customer_satisfaction_...
2025-08-15
0
41
题解 | 分析每个员工在不同项目中的绩效情况
select employee_id,employee_name,performance_score as first_half_2024_score,row_number()over(partition by project_name order by performance_score desc...
2025-08-13
0
38
题解 | 查询出不同类别商品中,销售金额排名前三且利润率超过 20%的商品信息
select product_id,product_name,category_id,sales_amount,ro as profit_rate from (select product_id,product_name,sales_amount,category_id,row_number() o...
2025-08-12
0
44
题解 | 电商平台想要了解不同商品在不同月份的销售趋势
select product_id,product_name,sum(quantity) as total_sales,max(quantity) as max_monthly_sales,min(quantity) as min_monthly_sales,round(avg(quantity),...
2025-08-12
0
38
题解 | 对商品的销售情况进行深度分析
select product_category,age_group,total_sales_amount,round(total_sales_amount/sum(total_sales_amount) over(partition by product_category ),2) as purch...
2025-08-09
0
59
题解 | 更新员工信息表
select EMPLOYEE_ID,POSITION,LAST_UPDATE_DT from (select EMPLOYEE_ID,if (max(UPDATE_DT) > LAST_UPDATE_DT,NEW_POSITION,POSITION) as POSITION, case w...
2025-08-08
0
54
题解 | 返回顾客名称和相关订单号以及每个订单的总价
select cust_name,o1.order_num,(quantity*item_price) as OrderTotal from Customers c join Orders o1 on c.cust_id = o1.cust_id join OrderItems o2 on o1.o...
2025-08-07
0
49
首页
上一页
1
2
下一页
末页