商品product(商品号productid,商品名productname,单价unitprice,
商品类别category,供应商provider);
顾客customer(顾客号customerid,姓名name,住址location);
购买purcase(顾客号customerid,商品号productid,购买数量quantity)
求购买的商品包含了顾客"Dennis"所购买的所有商品的顾客(姓名)
商品类别category,供应商provider);
顾客customer(顾客号customerid,姓名name,住址location);
购买purcase(顾客号customerid,商品号productid,购买数量quantity)
求购买的商品包含了顾客"Dennis"所购买的所有商品的顾客(姓名)
select distinct c1.name
from customer c1, purcase p1
where p1.customerid = c1.customerid
and p1.productid in (
select distinct p.productid
from customer c, purcase p
where p.customerid = c.customerid and
c.name = 'Dennis')
?????
这句话什么理解?商品包含"Dennis"演是顾客包含"Dennis"