I have two table.
The first table contains menu and price:
Menu | Price |
---|---|
Pizza | 20 |
Pie | 10 |
Beer | 5 |
Burger | 10 |
The second one contains a buyer and menu. I want to get the sum of price based on menu like in the example below on the Total
John | Doe | Niki | |
---|---|---|---|
Pizza | Burger | Burger | |
Beer | Beer | Beer | |
Pie | Beer | ||
Total | 25 | 35 | 20 |
Doe
is not right, it should be25