代码:
SELECT VendorID, SUM(PaymentTotal) AS PaymentSum FROM Invoices
输出:
VendorID PaymentSum
34 1200.12
37 340.00
48 856.92
答案 0 :(得分:0)
尝试
SELECT VendorID, SUM(PaymentTotal) AS PaymentSum FROM Invoices Group by VendorID