如何修复此代码以获取此输出

时间:2017-04-28 00:55:48

标签: sql

代码:

SELECT VendorID, SUM(PaymentTotal) AS PaymentSum FROM Invoices

输出:

VendorID    PaymentSum
34          1200.12
37          340.00
48          856.92

1 个答案:

答案 0 :(得分:0)

尝试

SELECT VendorID, SUM(PaymentTotal) AS PaymentSum FROM Invoices Group by VendorID