【发布时间】:2014-12-08 16:19:55
【问题描述】:
这是我的代码:
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
感谢您的帮助!
【问题讨论】:
标签: mysql sql database nexusdb