标签:商品 2gb ... 查询 nbsp 销售 pre HERE 产品
testdb是产品销售数据库,请在testdb中:查询既订购了“16M DRAM”商品,又订购了“1.2GB硬盘”商品的客户编号、订单编号和订单金额。
select distinct cust_id,b.order_no,tot_amt from sales b,product a,sale_item c where a.Prod_id=c.Prod_id and b.Order_No = c.Order_No and Prod_Name = ‘16M DRAM‘ and b.Order_No in ( select b.Order_No from Product a,sales b,sale_item c where b.Order_No = c.Order_No and a.Prod_id=c.Prod_id and Prod_Name = ‘1.2GB硬盘‘ )
实验16-09 请在testdb中:查询既订购了“16M DRAM”商品...
标签:商品 2gb ... 查询 nbsp 销售 pre HERE 产品
原文地址:https://www.cnblogs.com/masterchd/p/9337621.html