blob: 83eddf5b0333ad1a7c126029571489557aaa7ba3 (
plain)
1
2
3
4
5
6
7
8
9
10
|
select
`Order`.ID as OrderID,
concat("product ", Product.ID, ", ", OrderProduct.Aantal, " stuks") as OrderInhoud,
round(Product.Prijs * OrderProduct.Aantal, 2) as Subtotaal
from OrderProduct
left join `Order` on `Order`.ID = OrderProduct.OrderID
left join Klant on Klant.ID = `Order`.KlantID
left join Product on Product.ID = OrderProduct.ProductID
where Klant.ID = 1
group by OrderProduct.ProductID, `Order`.ID;
|