马国成好样的
马国成好样的
全部文章
分类
归档
标签
去牛客网
登录
/
注册
马国成好样的的博客
全部文章
(共51篇)
题解 | 用户订单信息查询
select city ,sum(total_amount) total_order_amount from customers c left join orders o on c.customer_id = o.customer_id group by 1 order by 2 desc,1
2025-07-09
0
44
题解 | 未下单用户统计
select count(distinct u.uid)-count(distinct o.uid) cnt from user_info u left join order_log o on u.uid = o.uid
2025-07-09
0
26
题解 | 返回顾客名称和相关订单号以及每个订单的总价
select cust_name , t1.order_num , sum(quantity*item_price) OrderTotal from Orders t1 left join Customers c on t1.cust_id = c.cust_id left join OrderIt...
2025-07-09
0
28
题解 | 每个顾客购买的最新产品名称
select customer_id, customer_name, product_name latest_order from( select o.customer_id, customer_name, product_name , rank () over(partition by o.cus...
2025-07-08
0
37
题解 | 统计每个产品的销售情况
with t1 as( select product_id ,sum(quantity) total_quantity from orders left join customers on orders.customer_id = customers.customer_id group by 1 )...
2025-07-08
0
30
题解 | 每个顾客最近一次下单的订单信息
select order_id,customer_name,order_date from( select order_id,customer_name,order_date ,rank () over(partition by o.customer_id order by order_date d...
2025-07-08
0
39
题解 | 查询订单
select order_id,customer_name,order_date from ( select order_id,customer_name,order_date , rank() over(partition by o.customer_id order by order_date ...
2025-07-08
0
29
题解 | 每个部门薪资排名前两名员工
select department ,employee_name ,salary from (select department ,employee_name ,salary ,rank () over(partition by department order by salary desc) ...
2025-07-08
0
43
题解 | 每个客户的账户总金额
select customer_id,sum(balance) sum_balance from account group by 1 order by 2 desc
2025-07-08
0
39
题解 | 商品销售总额分布
select if (pay_method = '','error',pay_method) ,count(*) from user_client_log left join product_info on user_client_log.product_id = product_info.prod...
2025-07-08
0
43
首页
上一页
1
2
3
4
5
6
下一页
末页