SELECT InvoiceNo as [Invoice No],
SUM(Quantity) as Quantity,
SUM(TaxableAmt) as Taxable_Amount,
SUM(CGSTAmt) as CGST_Amount,
SUM(SGSTAmt) as SGST_Amount,
SUM(Amount) as Amount
FROM tbl_PurchaseDetails
INNER JOIN tbl_CUSTOMERMASTER
ON tbl_CUSTOMERMASTER.PartyID = tbl_PurchaseDetails.PartyID
GROUP BY tbl_PurchaseDetails.InvoiceNo
上面的查询只返回一个表的结果,而我想要两个表的结果。
显示如下结果:
虽然我想要这样的结果: