07-03-2023 07:44 AM
Hello,
I have two tables I would need to join. Can you guys recommended me what would be the best ?
Table1
ID | SUB ID (ID + SUB ID are unique) | Country | Product Type | Calendar Year | Volume bought
Table2
Calendar Year | Country | Product Type | Volume Forecasted
I need to join the two to be able to calculate to compare the Volume bought (group by Country, Product Type and Calendar) vs the Volume Forecast.
thank you very much
07-03-2023 09:43 AM
It looks like you are describing a one to many relationship table 1 to table 2 in which case table 1 would be the child and table 2 the parent.
Depending upon what else will be in your schema I might go ahead and create an MV combining them, but the child-parent join should work for you.