题解 | 返回顾客名称和相关订单号以及每个订单的总价
select s1.cust_name,s3.order_num, quantity*item_price as OrderTotal from Customers s1,Orders s2,OrderItems s3 where s1.cust_id=s2.cust_id and s2.order_num=s3.order_num order by cust_name
select s1.cust_name,s3.order_num, quantity*item_price as OrderTotal from Customers s1,Orders s2,OrderItems s3 where s1.cust_id=s2.cust_id and s2.order_num=s3.order_num order by cust_name
相关推荐