Lead & Lag Window Functions in SQL (EXAMPLES INCLUDED)

preview_player
Показать описание
In this video, we take a look at 3 different use cases for the Lead and Lag SQL window functions. These are great to know for leetcode questions or SQL data analyst interview questions

Everything is coded within MSSQL and inside SQL Server Management Studio.

Interested in discussing a Data or AI project? Feel free to reach out via email or simply complete the contact form on my website.

🍿 WATCH NEXT

MY OTHER SOCIALS:

WHO AM I?
As a full-time data analyst/scientist at a fintech company specializing in combating fraud within underwriting and risk, I've transitioned from my background in Electrical Engineering to pursue my true passion: data. In this dynamic field, I've discovered a profound interest in leveraging data analytics to address complex challenges in the financial sector.

This YouTube channel serves as both a platform for sharing knowledge and a personal journey of continuous learning. With a commitment to growth, I aim to expand my skill set by publishing 2 to 3 new videos each week, delving into various aspects of data analytics/science and Artificial Intelligence. Join me on this exciting journey as we explore the endless possibilities of data together.

*This is an affiliate program. I may receive a small portion of the final sale at no extra cost to you.
Рекомендации по теме
Комментарии
Автор

Hey guys I hope you enjoyed the video! If you did please subscribe to the channel!


*Both Datacamp and Stratascratch are affiliate links.

RyanAndMattDataScience
Автор

Cool
I think there is supposed to be a breakdown explanation of what Lag and Lead means Atleast for some people who haven’t heard about it before, the practical alone won’t give them the knowledge. Thanks

diamakaa
Автор

Isn't your last example should be partition by name too? cause technically with lead for HR1 and HR2 thats not for the same person

fideliaholygunawan
Автор

GREAT! I can tell you definitely use R😂😅

rainebrookshire