Hi,
Please help me with advice.
I have three tables:
- Purchases
- Categories (products, fuel, etc)
- Buyers
One purchase can only have one category and one buyer. One category can have many purchases. One buyer can have many purchases.
The Category table is connected to the Purchases table via Relation (by category row id). The Buyers table is connected to the Purchases table via Relation (by buyer row id).
My purpose is to add in each row of the Buyers table the sum of his purchases in a certain category.
Now I know how to add the sum of all purchases of a certain buyer (via Rollup).
But how to use a second filter? How to add the sum of purchases of a certain buyer in a certain category?
Thank you for advices!