Hi friends, could you please help me, I'm trying to create a query from a table with fields Year, Location, Store, Product, AcqPrice, SalePrice.
I would like to get averages of AcqPrice and SalePrice of two selected Products (as a comparison) by Location but those products must have been sold in the same Year, Location and Store; Example:
Year Location Store Product AcqPrice SalePrice
2010 1 1 RedTshirt 20,00 28,00
2010 1 1 BlueTshirt 20,00 25,00
2010 1 2 BlueTshirt 20,00 26,00
2010 1 2 RedTshirt 20,00 26,00
2010 1 3 BlueTshirt 20,00 25,00
In this case RedTshirt and BlueTshirt where sold in Stores 1 and 2 and blue was sold in Store 3 so I like to get the average of those that have the same Year, Location and Store for both Products, showing for this example as follows:
Year Location Product AcqPrice SalePrice
2010 1 RedTshirt 20,00 27,00
2010 1 BlueTshirt 20,00 25,50
Hope you can help me....
Best Regards