Uploaded December 2020 | Updated September 2026, 2 hours ago
SQL window functions are common data science and analytics coding interview questions. They also are used almost everyday at your day job as a data scientist/product analyst. In this video, I'll go over a SQL interview question that involves a window function to handle time series data. You definitely need to know how to handle time series data if you want to do analytics in today's market. There are just too many companies that want to know what you're doing, when you're doing it, and where you're at. I'm looking at your Facebook, Google, Airbnb, etc. This question comes from Airbnb if it isn't obvious from the thumbnail.
Follow along with me and try out this problem: platform.stratascratch.com/coding/9637-growth-of-airbnb?python=&utm_source=youtube&utm_medium=click&utm_campaign=YT+description+link
______________________________________________________________________
π Subscribe to my channel: bit.ly/2GsFxmA
π Practice more real data science interview questions: platform.stratascratch.com/coding?utm_source=youtube&utm_medium=click&utm_campaign=YT+description+link
______________________________________________________________________
Timestamps:
Intro: (0:00)
Interview Question: (0:43)
Explore the Dataset: (1:40)
Solution Approach: (2:10)
Coding - Counting this year's host numbers: (4:05)
Coding - Explanation of the SQL Window Function LAG(): (5:55)
Coding - Applying growth rate formula: (7:56)
Outro: (9:24)
______________________________________________________________________
About The Platform:
I'm using StrataScratch, 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.
So, if you want more interview practice with real data science interview questions, visit platform.stratascratch.com/coding?utm_source=youtube&utm_medium=click&utm_campaign=YT+description+link. All questions are free and you can even execute SQL and python code in the IDE, but if you want to check out the solutions from me or from other users, you can use ss15 for a 15% discount on the premium plans.
______________________________________________________________________
Contact:
If you have any questions, comments, or feedback, please leave them here!
Feel free to also email me at nathan@stratascratch.com
______________________________________________________________________
#sql #datascience #sqlinterviews
SQL window functions are common data science and analytics coding interview questions. They also are used almost everyday at your day job as a data scientist/product analyst. In this video, I'll go over a SQL interview question that involves a window function to handle time series data. You definitely need to know how to handle time series data if you want to do analytics in today's market. There are just too many companies that want to know what you're doing, when you're doing it, and where you're at. I'm looking at your Facebook, Google, Airbnb, etc. This question comes from Airbnb if it isn't obvious from the thumbnail.
Follow along with me and try out this problem: platform.stratascratch.com/coding/9637-growth-of-airbnb?python=&utm_source=youtube&utm_medium=click&utm_campaign=YT+description+link
______________________________________________________________________
π Subscribe to my channel: bit.ly/2GsFxmA
π Practice more real data science interview questions: platform.stratascratch.com/coding?utm_source=youtube&utm_medium=click&utm_campaign=YT+description+link
______________________________________________________________________
Timestamps:
Intro: (0:00)
Interview Question: (0:43)
Explore the Dataset: (1:40)
Solution Approach: (2:10)
Coding - Counting this year's host numbers: (4:05)
Coding - Explanation of the SQL Window Function LAG(): (5:55)
Coding - Applying growth rate formula: (7:56)
Outro: (9:24)
______________________________________________________________________
About The Platform:
I'm using StrataScratch, 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.
So, if you want more interview practice with real data science interview questions, visit platform.stratascratch.com/coding?utm_source=youtube&utm_medium=click&utm_campaign=YT+description+link. All questions are free and you can even execute SQL and python code in the IDE, but if you want to check out the solutions from me or from other users, you can use ss15 for a 15% discount on the premium plans.
______________________________________________________________________
Contact:
If you have any questions, comments, or feedback, please leave them here!
Feel free to also email me at nathan@stratascratch.com
______________________________________________________________________
#sql #datascience #sqlinterviews
![Data Ranking: Python Pandas and SQL Equivalents [Part 2]
In this video, we dive deeper into ranking methods and functions in Python using data frames. We discuss additional parameters that can help refine the ranking function, making it more flexible and adaptable to different data sets. We also explore the SQL equivalence of ranking methods, which will be helpful for those familiar with SQL.
π Watch our previous tutorial:
How to Rank() Your Data In Python Pandas [Part 1]: https://youtu.be/2uu0prXMhfU
π§βπ» Go to the questions through the links below and follow along with us:
π Question 1: https://platform.stratascratch.com/coding/9611-find-the-80th-percentile-of-hours-studied?code_type=2&utm_source=youtube&utm_medium=click&utm_campaign=YT+python+sql+ranking
π Question 2: https://platform.stratascratch.com/coding/10160-rank-guests-based-on-their-ages?code_type=2&utm_source=youtube&utm_medium=click&utm_campaign=YT+python+sql+ranking
π Question 3: https://platform.stratascratch.com/coding/10161-ranking-hosts-by-beds?code_type=2&utm_source=youtube&utm_medium=click&utm_campaign=YT+python+sql+ranking
π Question 4: https://platform.stratascratch.com/coding/10351-activity-rank?code_type=2&utm_source=youtube&utm_medium=click&utm_campaign=YT+python+sql+ranking
π 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
π Playlist for data science projects: https://bit.ly/StrataScratchProjectsYouTube
π Practice more real data science interview questions: https://platform.stratascratch.com/coding?utm_source=youtube&utm_medium=click&utm_campaign=YT+python+sql+ranking
Timeline:
Intro: (0:00βββ)
Percentage Ranking in Python: (0:43)
Ranking in SQL: (4:10)
Conclusion: (β7:26)
About The Platform:
Im using StrataScratch (https://platform.stratascratch.com/coding?utm_source=youtube&utm_medium=click&utm_campaign=YT+python+sql+ranking), 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.
So, if you want more interview practice with real data science interview questions, visit https://platform.stratascratch.com/coding?utm_source=youtube&utm_medium=click&utm_campaign=YT+python+sql+ranking. All questions are free and you can even execute SQL and python code in the IDE, but if you want to check out the solutions from me or from other users, you can use ss15 for a 15% discount on the premium plans.
Contact:
If you have any questions, comments, or feedback, please leave them here!
Feel free to also email me at nathan@stratascratch.com
#pandaspythontutorial #pythondatascience #sqlrank Data Ranking: Python Pandas and SQL Equivalents [Part 2]](https://i.ytimg.com/vi/Cg66PLiW9L0/mqdefault.jpg)









