Lead/Lag Window Analytical functions in SQL | Advance SQL concepts

preview_player
Показать описание
In this video we will learn lead/lag analytical functions. these functions are used when you need to compare current row with another previous or next row. Very important for interview preparation as well.
Рекомендации по теме
Комментарии
Автор

This was a helpful demonstration of the lead and lag functions. Thank you!

ianpropst-campbell
Автор

Really Good. Explained in the simplest way.

amitkushwah
Автор

As usual, great content. Excellent work. thank you

dfkgjdflkg
Автор

Awesome 😎👍.. such a lovely & simple explanation 😊

gyan_chakra
Автор

I always get confused with the combination of lead/lag and order by in the over clause which lead to couple of tries to get the desired output, faced similar confusion today and searched your channel for the these functions. Thank you for covering exactly what I was looking for!!

rks.siddhartha
Автор

That's the best explanation I found on lead and lag, thanks bro

ShriJi-Rasoi
Автор

It is well explained. The example is aweomse. Thank you, Ankit!!

minlin
Автор

Thanks for your valuable knowledge Sharing. Although I learned SQL but everytime I came here, always feel I know nothing.
Keep Good work going 👍 & also if possible please start sharing your knowledge on Python it will be very helpful.
Thanks

learnwithAashish
Автор

Thank you, I have got a job with 50%, I have learnt virtually from your videos, my concept got clear . Thank you so much

lokeshsharma
Автор

Excellent explanation, especially with real time scenario example

sharans
Автор

Hi Ankit,
I am using history table where create_dt is the indicator for comparison between 2 rows, I have used this lag logic to generate scd2 on my history table. Thanks

mdfurqan
Автор

Order_date column is in text format, maybe that is why it is giving me null select month(order_date) from superstore data table. Can you please suggest why is this happening. it pull null values for me. I am using MySQL workbench and when I use select EXTRACT(MONTH FROM Order_Date) as month from superstore_orders; it pulls null values for all the columns . Can someone help please.

anamikachaudhary
Автор

Where we can download the superstore data

prasadchowdary
Автор

It really good if you can provide the dataset link so that we can practice simultaniously

shankrukulkarni
Автор

Suppose we have the YEAR, Revenue column but the year is 2012, 2015, 2016, 2017, and 2019 then this case how to calculate the missing default year 0 and subsequent.

pavankumarchahar
Автор

Hi Ankit,
What change should do in the query
If I want to see the sales of same period last year till the date
(YTD previous year)? Can you help ?

shifanasheriff
Автор

do bring some more example question related to sql topics and provide data shert for practvie sir

PhysicsCoachAnkitSaraswat
Автор

Can you make a video on the code which is different in different database like oracle, mysql workbench, postgresql, ms server?

ritikajaiswal
Автор

Please provide the create and insert query so that we can practice

rashisingh
Автор

Why use sql when we have powerful tools like powerbi, tableau ? I am very curious and no way mean to disrespect . Please answer

harshupreti