wz72n01
05-03-2009, 09:15 AM
If I have the following 3 records:
Location1: Kansas
Part Number1: A1234
Seller Part Number1: B1234
Customer Price1: $10
Seller Price1: $8
Volume1: 20
Location2: Georgia
Part Number2: A2345
Seller Part Number1: B1234
Customer Price2: $12
Seller Price1: $8
Volume2: 15
Location3: Colorado
Part Number1: A3456
Seller Part Number1: B1234
Customer Price3: $14
Seller Price2: $6
Volume3: 10
How do I correctly calculate
#1 The difference between prices from different locations and multiply by the correct volume (e.g. Georgia and Colorado will be $14 - $12 x 10)
#2 The difference between the lowest Seller price and each location(e.g. Georgia would be $12 - $6 x 15)
My queries just take the min and max values and multiply by average volume -- I am not sure how to get the CORRECT volume for each location :think:
Location1: Kansas
Part Number1: A1234
Seller Part Number1: B1234
Customer Price1: $10
Seller Price1: $8
Volume1: 20
Location2: Georgia
Part Number2: A2345
Seller Part Number1: B1234
Customer Price2: $12
Seller Price1: $8
Volume2: 15
Location3: Colorado
Part Number1: A3456
Seller Part Number1: B1234
Customer Price3: $14
Seller Price2: $6
Volume3: 10
How do I correctly calculate
#1 The difference between prices from different locations and multiply by the correct volume (e.g. Georgia and Colorado will be $14 - $12 x 10)
#2 The difference between the lowest Seller price and each location(e.g. Georgia would be $12 - $6 x 15)
My queries just take the min and max values and multiply by average volume -- I am not sure how to get the CORRECT volume for each location :think: