这是我的代码:
SELECT Invoice_detail.Xtype,
Invoice_detail.Totallineprice
FROM Invoice_detail Invoice_detail
INNER JOIN Invoice_head Invoice_head ON
(Invoice_head.idx = Invoice_detail.Xinvoicehead)
WHERE ( Invoice_detail.Totallineprice <> 0 )
AND ( Invoice_head.xCurrency = 1 )
ORDER BY Invoice_detail.Xtype
返回:
301 - 50
291 - 56.25
291 - 75
70 - (125)
70 - 50
70 - 75
如何让这段代码相加,使我的结果看起来更像这样?
301 - 50
291 - 131.25
70 - 0
谢谢你的帮助!