SELECT DISTINCTROW ProductsId AS pid,( SELECT SUM(QuantityByID) WHERE ProductsId=pid ) FROM caritem
我想得到这个结果
ProductId Quantity
7 7
13 2
14 2
9 1
SELECT DISTINCTROW ProductsId AS pid,( SELECT SUM(QuantityByID) WHERE ProductsId=pid ) FROM caritem
我想得到这个结果
ProductId Quantity
7 7
13 2
14 2
9 1