Select (sum(OS.Small) + sum(OS.Medium)) * T.ColorPrice as TotalPrice
from Order_Colors OC
left outer join Order_Selection OS on OS.Order_ColorID = OC.Order_ColorID
left outer join TShirtPrices T on T.Order_ColorID = OS.Order_ColorID
left outer join OrderInfo O on O.OrderID = OS.OrderID
where O.CID = 1025
group by OC.Order_ColorID, OC.Color, O.OrderID, T.ColorPrice, T.TShirtPurchaseID
这个查询给了我 1 列“总价格”,大约 20 行。我希望在同一个 sql 查询中获得所有这些行的总和。在 MS SQL 2005 中可以吗?