Hello, I have a task that I don’t know how to implement.
1 table “inventory” contains a database of our products where for each product there is a minimum and maximum price at which we can sell this product.
2 table “min/max price” contains % of min and max price for three different models of selling products.
In table 1 “inventory” using the type of column “to link column” in relation to the type of product sales, the min/max % is loaded from second table and then the real minimum and maximum selling price is calculated relative to this % in first table.
Task: To change not only the min/max % in Table 2 for 3 sales models, but also for each of the 4 stores.
Now the min/max table looks like this.
Columns.
Sales model | Min Price % | Max Price % |
Model 1 | 25% | 75%
Model 2 | 100% | 600%
Model 3 | 75% | 150%
And I would like it to look like this
Columns.
Sales model | Store | Min Price % | Max Price % |
Model 1 | Store 1 | 25% | 75%
Model 2 | Store 1 | 100% | 600%
Model 3 | Store 1| 75% | 150%
Model 1 | Store 2 | 25% | 75%
Model 2 | Store 2| 100% | 600%
Model 3 | Store 2 | 75% | 150%
Model 1 | Store 3 | 25% | 75%
Model 2 | Store 3 | 100% | 600%
Model 3 | Store 3 | 75% | 150%
Model 1 | Store 4 | 25% | 75%
Model 2 | Store 4 | 100% | 600%
Model 3 | Store 4 | 75% | 150%
As a result, in table #1 of the “Inventory”, I want the % to be loaded not only relative to the link by the sales model, but by the sales model + store in order to set a flexible pricing policy for the store + model, because so far we are configured only by the sales model.