Lateral
Lateral
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Lateral的博客
全部文章
(共102篇)
题解 | 统计每个产品的销售情况
with t2 as( select o.*, c.customer_age, month(o.order_date) as order_month from orders o left join customers c on ...
2025-03-25
0
40
题解 | 每个顾客最近一次下单的订单信息
select t.order_id, t.customer_name, t.order_date from (select o.order_id, c.customer_name, o.order_date, ...
2025-03-25
0
29
题解 | 商品id数据清洗统计
select substr(order_id,instr(order_id,'_')+1,4) as product_id, count(*) as cnt from order_log group by substr(order_id,instr(order_id,'_')+1,4) ...
2025-03-25
0
35
题解 | 查询订单
with newest_order as (select c.customer_name, o.order_id, o.order_date, row_number() over(partition by o.customer_id order by o.order_date de...
2025-03-25
0
31
题解 | top2的薪水排名
with ranking as( select department, employee_name, salary, rank() over(partition by department order by salary d...
2025-03-25
0
40
题解 | 每个部门薪资排名前两名员工
with ranking as(select *, rank() over(partition by department order by salary desc) as rank_number from employees) select department, ...
2025-03-25
0
34
题解 | 每个客户的账户总金额
select customer_id, sum(balance) as sum_balance from account group by customer_id order by sum_balance desc,customer_id asc
2025-03-25
0
36
题解 | 商品销售总额分布
select t1.pay_method, count(*) as cnt from (select case when u.pay_method<>'' then u.pay_method else 'error' end as pay_method from user_client...
2025-03-25
0
32
题解 | 商品销售排名
select p.product_name, p.price*count(p.product_name) as total_sales from user_client_log u left join product_info p on u.product_id=p.product_id where...
2025-03-24
0
34
题解 | 商品价格排名
select t1.product_id, t1.product_name, t1.type, t1.price from (select product_id, product_name, type, ...
2025-03-24
0
19
首页
上一页
2
3
4
5
6
7
8
9
10
11
下一页
末页