I'm trying to create a query, that will calculate sum of products on invoice. I have 3 tables :
- Product (with product's price)
- Invoice (with invoice id)
- Products on invoice (with invoice id, product id and number of particular products)
So in my query I take invoice_id (from invoice), price (from product),number of products sold and invoice_id (from products on invoice) and calculate their product in fourth column. I know I sohuld use 'Totals' but how to achieve that ?
Model: