I am trying to build a table to show me the price of an item each day over a specified time period.
I begin with three tables:
one containing the sale price with a start and end date, one containing the regular price of an item and when it started at that price, and one date table that just has dates for filling in blanks.
Tables:
Sale price table : itemid, price, sale_date_start, sale_date_end
Regular price table : itemid, regularp, regularp_date
missing date table : missingdate (date table, with 5 years of dates by day)
Items can have multiple regular price entries as well as multiple sale price entries. I am new to SQL, I have written some queries to try to combine these, but they do not work correctly -- nor do i think I am on the right track.
Can someone help?