stf666
stf666
全部文章
分类
归档
标签
去牛客网
登录
/
注册
stf666的博客
全部文章
(共55篇)
题解 | 统计骑手信息
with t1 as ( select /*group by 本身会去重无需distinct*/ zone_id, zone_name, sum( if (year(ord...
2025-11-16
0
23
题解 | 统计借阅量
with details as( select book_id ,book_title ,region ,borrow_date from Books /*必须左连接,不然有数据缺失风险*/ left join BorrowRecords us...
2025-11-15
0
21
题解 | 贷款情况
with t1 as ( select city, count(distinct customer_id) as total_customers, round(sum(loan_amount),2) as...
2025-11-09
0
23
题解 | 查询高价值旅行套餐客户的支出与套餐详情
select c.name as customer_name ,sum(price) as total_travel_cost ,count(*) as order_count ,round(avg(price),2) as avg_order_price from bookings b join ...
2025-10-31
0
31
题解 | 分析各产品线在特定时间段内的销售情况
select product_line ,region ,channel_name ,sum(sale_amount) as total_sale_amount ,count(*) as total_sale_quantity from oppo_products join sales_data u...
2025-10-31
0
28
题解 | 深入分析各款产品年总销售额与竞品的年度对比
select product_id ,product_name ,competitor_name ,sum(quarter_1_sales_amount + quarter_2_sales_amount + quarter_3_sales_amount +quarter_4_sales_amount...
2025-10-31
0
27
题解 | 饿了么需要分析不同配送员在不同天气条件下的配送效率和用户投诉情况
select weather_type ,round(avg(delivery_time),2) as average_delivery_time ,count(*) as delivery_count from delivery_records join weather_conditions us...
2025-10-31
0
31
题解 | 哪些产品在特定时间段内表现最为出色
select product_id ,product_name ,total_sales_amount ,total_sales_quantity from ( select product_id ,sum(sales_amount) as total_sales_amount ...
2025-10-31
0
24
题解 | 了解 2023 年全年所有商品的盈利情况
/*分组后product_id= 2 有两组值,说明之前的group by product_id,unit_price,purchase_price 有两组不同的值,题目要求输出每个产品的总利润和利润率,即是忽略了unit_price,purchase_price的价格差异(实际生活中同一产品的进价...
2025-10-31
0
30
题解 | 评估不同供应商提供的零部件质量和成本情况
select distinct supplier_id ,supplier_name ,component_name ,quality_score ,cost from supply_quality_cost join suppliers using(supplier_id) join compo...
2025-10-30
0
28
首页
上一页
1
2
3
4
5
6
下一页
末页