Hi dear ,
how can i grouping results below statement :
SELECT O.IdBook, COUNT(O.IdBook) * O.Quantity AS noOfBooks
FROM dbo.tblOrderDetail AS O INNER JOIN
dbo.tblInvoice AS I ON O.IdOrder = I.IdOrder
WHERE (I.IsPay = 1)
GROUP BY O.IdBook, O.Quantity
result of statement up is:
in result we have two 5 in id book ,I want it show one 5 and in quantity show sum of 2+3
Please help,
idbook -- Quantity
1
2 ...
Go to the complete details ...