在线急等,求一个sql复合查询的语句
购物商品表shopcart
------------------------
id 流水码
usid 会员id
ordid 订单编号
ptid 商品ID
nums 数量
商品表product
--------------------------
id 流水码
Amount 商品剩余数量
我想一句话实现,在商品表product中减去所有的购物表shopcart包含的商品的数量
update product set Amount=Amount-??? where id in (select ptid as id from shopcart)