I'm developing a query in which I have "Store, Product, Date of sale, provider and units sold" but as you may imagine the provider changes for the same product during a period of time.
I want to know if it's possible to sumarize the providers in one and getting the newest one by the same time
Store Product Date Provider Units
1 1 01/01/08 a 20
1 1 15/01/08 b 30
The desired outcome should be 50 units for the 'b' provider in booth days because it's the most recent to sell a unit.
thanks in advance for any tips!