I have two tables: A & B
Table A contains sales info: product number, product type, invoice date, and invoice price
Table B contains contract pricing information: It is based on the product number, product type. The contract pricing information is based by product type and specified date ranges:
- I.E Product number 1 with product type 1.A pricing info is $10 from 01/01/2015-10/31/2015 and for the same product number and product type price is $15 from 11/01/2015 to 12/31/2016
How can I write a query that will select the specific contract price based on the invoice date? Any insights is appreciated.