SQL Server使用子查询和CTE提供数据之关系除(二)
oductCategory.ProductCategoryname='玩具'
)
and
--购买的玩具种类
count(distinct ToysOrder.ProductCode)=
(
--商品中的玩具种类
select count(ProductCode) from Product
inner join PrductCategory on Product.ProductCategoryID=ProductCategory.ProductCategoryID
where ProductCategory.ProductCategoryname='玩具'
)