I can\'t figure this out... If I write this query...
SELECT SUM(d.Quantity) FROM Invoice i INNER JOIN InvDet d ON i.InvoiceId = d.InvoiceId
I get