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

Опубликовано: 03 Ноябрь 2024
на канале: StrataScratch
32,973
1k

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: https://platform.stratascratch.com/co...

______________________________________________________________________

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: https://bit.ly/36kKbxG

👉 Subscribe to my channel: https://bit.ly/2GsFxmA
👉 Playlist for more data science interview questions and answers: https://bit.ly/3jifw81
👉 Playlist for data science interview tips: https://bit.ly/2G5hNoJ
👉 Practice more real data science interview questions: https://platform.stratascratch.com/co...

______________________________________________________________________
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 (https://platform.stratascratch.com/co..., 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 [email protected]
______________________________________________________________________


#datascience​interview #sqlinterviews