#第一步对表OrderItems聚合 # SELECT # order_num, # SUM(item_price * quantity) total_ordered # FROM # OrderItems # GROUP BY # order_num #第二步表连接 select cust_id ,tb.total_ordered from( SELECT order_num, SUM(i...