题解 | 用户订单信息查询
用户订单信息查询
https://www.nowcoder.com/practice/dccec8456d774169925c0d50843ea076
SELECT
b.city,
SUM(a.total_amount) AS total_order_amount
FROM orders AS a
INNER JOIN customers AS b
ON a.customer_id = b.customer_id
GROUP BY b.city
ORDER BY total_order_amount DESC,b.city;
查看2道真题和解析
智元机器人成长空间 270人发布