Lateral
Lateral
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Lateral的博客
全部文章
(共115篇)
题解 | 分析每个员工在不同项目中的绩效情况
select e.employee_id, e.employee_name, coalesce(p.performance_score,0) as first_half_2024_score, dense_rank() over(partition by j.pro...
2025-07-11
0
39
题解 | 查询出不同类别商品中,销售金额排名前三且利润率超过 20%的商品信息
with t as( select p.product_id, p.product_name, p.category_id, coalesce(s.sales_amount,0) as sales_amount, ...
2025-07-11
0
41
题解 | 分析每个商品在不同时间段的销售情况
WITH t AS ( SELECT p.product_id, p.product_name, p.category, -- 确保 supplier_name 不为空,关联失败时用默认值(或直接保留 NULL 后续处理) ...
2025-07-11
0
33
题解 | 电商平台想要了解不同商品在不同月份的销售趋势
with t as( select p.product_id, p.product_name, s.sale_month, s.quantity as monthly_sales, sum(s.quantity)...
2025-07-04
0
37
题解 | 电商平台需要对商家的销售业绩、退款情况和客户满意度进行综合评估
with sales as( select merchant_id, sum(sale_amount) as total_sales_amount from sales_underline group by merchant_id), r...
2025-07-04
0
36
题解 | 对商品的销售情况进行深度分析
with t1 as( select p.category as product_category, c.age_group as age_group, sum(s.quantity*s.price) as total_group_sales...
2025-07-04
0
37
题解 | 对商品的销售情况进行深度分析
with t1 as( select p.category as product_category, c.age_group as age_group, sum(s.quantity*s.price) as total_group_sales...
2025-07-04
0
29
题解 | 获得积分最多的人(三)
with t as (select u.id,u.name, case when g.type='add' then g.grade_num else -1*g.grade_num e...
2025-06-30
0
33
题解 | 获得积分最多的人(一)
select t.name, t.grade_num from (select u.name as name, sum(g.grade_num) as grade_num from user u right join grade_info g on ...
2025-06-30
0
37
题解 | 最差是第几名(二)
WITH final_ranks AS ( SELECT grade, total_num, end_rank, COALESCE(LAG(end_rank) OVER(ORDER BY grade ASC), 0) + 1...
2025-06-30
0
33
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页