Add foreign key constraint to an existing table column, referencing a column in a newly created table
Select all distinct date from sales tables and insert data into the dates tables. After populating data into that table try to create the foreign key constraint.