-- 简单写下思路,先写一个子查询查询出分组后的订单和,然后再查询对结果进行排序 select cust_name, total_price from ( select c.cust_name, sum(round(o.item_price * o.quantity, 3)) as total_price from OrderItems as o join Orders as r on o.order_num = r.order_num ...