Advanced Data Science SQL Interview Question [Amazon] (window functions & aliasing) @stratascratch
Advanced Data Science SQL Interview Question [Amazon] (window functions & aliasing)  @stratascratch
Uploaded February 2021 | Updated September 2026, 14 minutes ago
This SQL data science interview question was asked by Amazon and will test your date manipulation and window function skills. I’ll cover both the question and walk you through the approach. I’ll also talk about my 4 step approach to solving any data science interview question. This is literally how I would answer every data science interview question and prepare for every data science interview at FAANG companies and others.

Link to the question: platform.stratascratch.com/coding/10319-monthly-percentage-difference?python=&utm_source=youtube&utm_medium=click&utm_campaign=YT+description+link

______________________________________________________________________

This series is for both beginner and intermediate data scientists and analysts interested in learning how to solve common data science interview questions in SQL. These are real data science interview questions. For some background context and an intro about what this series is about: bit.ly/36kKbxG

πŸ‘‰ Subscribe to my channel: bit.ly/2GsFxmA
πŸ‘‰ Playlist for more data science interview questions and answers: bit.ly/3jifw81
πŸ‘‰ Playlist for data science interview tips: bit.ly/2G5hNoJ
πŸ‘‰ Practice more real data science interview questions: platform.stratascratch.com/coding?utm_source=youtube&utm_medium=click&utm_campaign=YT+description+link

______________________________________________________________________
Timeline:

Intro: (0:00)
Question: (1:18)
4-Step framework to solve the question: (2:02)
Explore underlying data: (2:18)
Identify required columns: (3:45)
Visualize the output: (4:12)
Build solution step-by-step and test: (4:44)
Coding: (4:57)
Format data to YYYY-MM: (6:27)
Calculate current month's revenue: (7:46)
Calculate previous month's revenue: (8:36)
Aggregate to year-month: (10:25)
Implement month-over-month difference formula: (11:26)
Apply a window alias: (13:15)
Clean up formatting: (14:06)
Conclusion: (14:50)
______________________________________________________________________
About The Platform:

I'm using StrataScratch (platform.stratascratch.com/coding?utm_source=youtube&utm_medium=click&utm_campaign=YT+description+link), a platform that allows you to practice real data science interview questions. There are over 1000+ interview questions that cover coding (SQL and python), statistics, probability, product sense, and business cases.

______________________________________________________________________
Contact:

If you have any questions, comments, or feedback, please leave them here!
Feel free to also email me at nathan@stratascratch.com
______________________________________________________________________


#datascience​interview #sqlinterviews
Advanced Data Science SQL Interview Question [Amazon] (window functions & aliasing)Data Project: Analyzing Review Sentiment for Accurate Ratings [Part 1]Using visualizations for your exploratory data analysisRotten Tomatoes Movie Rating Prediction - Data Science ProjectComparing FAANG vs Non-FAANG Data Science Interview QuestionsPython Pandas Techniques In A Meta Data Science InterviewThis Meta SQL Question Tricks Almost Everyone(Part 2) Deepen Your Understanding of Data with These Simple TipsData Preparation for Modeling [DoorDash Data Science Project]Full stack data science toolsMost Common Data Science SQL Interview Question from DoorDash [window functions & partitions]Automating Your Data Science Tasks In Python (importing CSV files to database AUTOMATION TUTORIAL)
StrataScratch |

Advanced Data Science SQL Interview Question [Amazon] (window functions & aliasing)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER