我有两个数据源:
来源1包含产品ID和价格日期,需要根据产品ID和两个日期范围之间的源2找到与日期对应的价格,因为没有确切的日期匹配。以下是表格:
来源1
Product ID Price Date Need price
2512330 05/07/2016 ???
2512330 06/07/2016 ???
2512330 06/13/2016 ???
2512330 07/20/2016 ???
2512330 08/27/2016 ???
2512330 09/22/2016 ???
来源2:
Product ID Current Update Price First Update Price Second Update Price Third Update Price Fourth Update Price Fifth Update Price
2143480 5/2/2017 405.60 8/18/2016 375.60 12/23/2015 344.88 5/29/2015 319.08 10/20/2014 292.99 10/1/1996 0.00
2512330 5/2/2017 18.36 12/6/2016 16.70 6/3/2016 15.62 12/1/2015 14.22 5/14/2015 12.94 12/4/2014 11.77
3089421 1/1/2017 7.77 4/1/2016 7.20 8/24/2015 6.67 12/15/2014 6.30 3/17/2014 5.83 8/30/2013 5.31
提前感谢您的帮助。
octord