-
Notifications
You must be signed in to change notification settings - Fork 182
Description
Hi there Katie, I have been using your solutions as my reference, thank you for the effort you invested in all of this challenge.
I'd like to remind you that you may have forgotten to be inclusive of the fact that in step 2 of the cleansing process, you ought to make sure that each year week 1 must contain the dates 1st Jan - 7th Jan, week 2 must contain the dates 8th Jan - 14th Jan, and so on. With the code as it is, with the default start weekday in sql as 7 (Sunday), your week 1 in 2018 will contain dates 1st Jan - 6th Jan, and week 2 will contain dates 7th Jan - 13th Jan, and the rest of the week numbers to be misrepresented and inaccurate, which may mess up the entire analysis. Therefore you'll have to adjust for that in your code and everything will be good, BE mindful of the fact that 2018 has 53 weeks in it, the other years 52 weeks. You can adjust it with something like the code below in the attached file, replace 'date_missing' with 'week_date'(already converted into the proper datatype)