I’m working with a MS Access database.
I have three tables :
Customers (idCustomer, CustomerName) :
1 C1
2 C2
3 C3
4 C4
5 C5
Products (idProduct, ProductName) :
1 P1
2 P2
3 P3
4 P4
Orders (id, idCustomer, idProduct, Quantity) :
1 2 1 10
2 2 2 15
3 4 2 13
4 5 4 19
I’m working on a query to get this result :
- Rows = Customers (all customers)
- Columns = Products (all products)
- Cells = Quantity
Like this :
P1 P2 P3 P4
C1 0 0 0 0
C2 10 15 0 0
C3 0 0 0 0
C4 0 13 0 0
C5 0 0 0 19
Can anyone help on this query task?