-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data Mart : Part C before and after analysis #14
Comments
Well that is quite thoughtful of you to do that. And I'm a little bit worried about your part C analysis, I have noticed you included the date 2020-06-15, and the question really asks for 4 weeks before and after. Now the 'after' part cannot include the date 2020-06-15 reported sales, because those are accumulated(or aggregated rather) sales from Tuesday week before(2020-06-09). So you ought to count the weeks from the (2020-06-22) and exclude the 2020-06-15 date. Otherwise it will mess up the analysis. I just peeked at your code praveen555, I think Katie made that error as well, but I think Katies error was by default mainly because of the cleaning part which I raised. |
As per the case study "We would include all week_date values for 2020-06-15 as the start of the period after the change and the previous week_date values would be before" note the word- include
|
Oh yeah, thank you very much, I am actually the one that missed that part. Thanks Praveen, I appreciate your input in all of this. |
yes now that i think about it more in depth date_add('2020-06-15', interval 4 week) should be used. I used 3 weeks influenced by it. Because all dates between 2020-06-15 and 2020-07-12 should be included for after analysis. That would give the correct results as per questions. |
Nah Praveen, I think you were right when you said we ought to include the week date values for 2020-06-15, because of this statement from Danny: |
Using the week_number to filter out the dates would result in incorrect analysis. A simple query will show that week_number shift in 2020.
Hence it is better to use date_add, date_sub and interval to filter out the correct dates.
The text was updated successfully, but these errors were encountered: