So, i have this table let's just call it product
============================================
sku || valid_from || valid_to || price ||
============================================
AAA || 2021-01-26 || 2021-01-31 || 20000 ||
AAA || 2021-02-01 || 2021-02-15 || 15000 ||
AAB || 2021-02-27 || 2021-02-05 || 30000 ||
AAC || 2021-01-28 || 2021-02-06 || 25000 ||
============================================
and i would like to select between a range of dates by code and list all the prices from the start to the end of the range like this:
(eg: select by sku = 'AAA', and from 2021-01-26 to 2021-02-02)
expected output:
===============================
date || sku || price ||
===============================
2021-01-26 || AAA || 20000 ||
2021-01-27 || AAA || 20000 ||
2021-01-28 || AAA || 20000 ||
2021-01-29 || AAA || 20000 ||
2021-01-30 || AAA || 20000 ||
2021-01-31 || AAA || 20000 ||
2021-02-01 || AAA || 15000 ||
2021-02-02 || AAA || 15000 ||
===============================
can anyone be of any help? doing a database query is definitely not my strong suit :/