按多列分组
SELECT * FROM <TableName> GROUP BY <Column1>,<Column2>
QuantityBreakdown( MaterialID int, ProductID int, Quantity float)INSERT INTO @QuantityBreakdown (MaterialID, ProductID, Quantity)SELECT MaterialID, ProductID, SUM(Quantity)FROM @TransactionsGROUP BY MaterialID, ProductID
慕田峪7331174
长风秋雁
尚方宝剑之说