Supercharge Your SQL Skills with Lead & Lag Functions

preview_player
Показать описание
Be a super hero and learn to LEAD (and LAG) in SQL. I start out showing you the problem statement in #Excel and then we take it over to SQL Server to script common table expressions using window functions in order to solve a business question on time intervals.
#sqlserver #analytics #tsql #groupby #dataanalyst #data

0:00 INTRO
1:08 DATA OVERVIEW IN EXCEL
4:15 GET STRAIGHT TO THE POINT: LAG FUNCTION
4:38 MIGOS
6:09 RESULTS WITH PARTITION BY
6:09 RESULTS WITHOUT PARTITION BY
8:52 LEAD FUNCTION
9:57 BONUS CONTENT: SQL SCRIPT USING CTEs

Learn GROUP BY vs PARTITION BY in SQL

★☆★ FOLLOW ME BELOW: ★☆★

☕☕ If my channel has helped you, consider buying me a coffee! Thanks & Cheers! ☕☕

★☆★ Support this Channel: ★☆★

#Excel #SQLServer #analytics #data #dataanalyst #education #onlinelearning
Рекомендации по теме
Комментарии
Автор

Great video! Enjoyed watching you use of Excel formulas to help code and validate the LAG(), LEAD() and AVG() functions using SQL. Thanks Anthony!

uc
Автор

Hello, I’m wondering if you have or can do a tutorial on creating a parameter table such as start datetime & end datetime and how to incorporate this so a user can input the date and use it to refresh the table being pulled from a database?

ifortniteclipz