select cust_id,(select sum(item_price*quantity) from OrderItems OI where OI.order_num = O.order_num) as total_ordered from Orders Oorder by total_ordered desc; 使用子查询
方法一:普通联结 select cust_name, order_num from Customers C,Orders O where C.cust_id = O.cust_id order by cust_name,order_num; 方法二:使用内连接 select cust_name,order_num from Customers C inner join Orders O
世界营销大师菲利普.科特勒最新力作最新全球营销智慧和最佳实践的精华《营销革命3.0:从产品到顾客,再到人文精神》基本信息原书名: Marketing 3.0: From Products to Customers to the Human Spirit原出版社: Wiley作者: (美)菲利普.科特勒(Philip Kotler) (印度尼西亚)何麻温.卡塔加雅(Hermawan Karta