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
• Learn GROUP BY vs PART...
★☆★ FOLLOW ME BELOW: ★☆★
bit.ly/m/anthonysmoak
☕☕ If my channel has helped you, consider buying me a coffee! Thanks & Cheers! ☕☕
www.buymeacoffee.com/anthonys...
★☆★ Support this Channel: ★☆★
Merch ► shop.spreadshirt.com/AnthonySmoak
#Excel #SQLServer #analytics #data #dataanalyst #education #onlinelearning
5 авг 2024