first_value and last_value SQL window functions MASTER CLASS | Advance SQL

preview_player
Показать описание
In this video we are going to discuss 2 important SQL window functions first value and last value. We will discuss them in detail and talk about some important issues with the last value function.

Zero to hero(Advance) SQL Aggregation:

Most Asked Join Based Interview Question:

Solving 4 Trick SQL problems:

Data Analyst Spotify Case Study:

Top 10 SQL interview Questions:

Interview Question based on FULL OUTER JOIN:

Playlist to master SQL :

Rank, Dense_Rank and Row_Number:

script:
create table employee(
emp_id int,
emp_name varchar(20),
dept_id int,
salary int,
manager_id int,
emp_age int
);

insert into employee values(1,'Ankit',100,10000,4,39);
insert into employee values(2,'Mohit',100,15000,5,48);
insert into employee values(3,'Vikas',100,10000,4,37);
insert into employee values(4,'Rohit',100,5000,2,16);
insert into employee values(5,'Mudit',200,12000,6,55);
insert into employee values(6,'Agam',200,12000,2,14);
insert into employee values(7,'Sanjay',200,9000,2,13);
insert into employee values(8,'Ashish',200,5000,2,12);
insert into employee values(9,'Mukesh',300,6000,6,51);
insert into employee values(10,'Rakesh',500,7000,6,50);

#sql #advanced
Рекомендации по теме
Комментарии
Автор

Make video on different functions, like COALESCE, EXIST, INTERVAL, CONCAT, EPOCH etc

SKAMRANPASHA
Автор

Good to know the difference between first and last value.

Thanks a lot sir🙏

avi
Автор

Whenever I watch your video I really Learn New Things Thankyou Sir❤❤

rockagain
Автор

The perfect explanation which I was searching till date over the internet reg the issue with Last Date func !! Thank you 😀😀

sreemalapal
Автор

Thank for providing script in description Ankit.
Also kindly try to do atleast 3videos per week . Just a request.
Thank you

amazingriknow
Автор

Awesome explanation! Thanks for sharing

jasleenkaur-cwfw
Автор

I learn something new today. Thanks for this. It is really helpful

pujasil
Автор

Thank you so much Ankit Sir your explanation is

vishwish
Автор

Thanks for this video. It was super useful!!!

equiwave
Автор

Fantastic Information. Thank you Ankit

SantanuRoy-oqnv
Автор

Sir, It would be great if you take a SQL query where we have to make use of these functions.

inspiredomkar
Автор

Useful as always, thanks Ankit. The difference between the two functions is tricky, thanks for bringing that up.

andreagreco
Автор

Thankyou So much Sir for this Amazing Guidance

SACHINKUMAR-pxkq
Автор

Hey Ankit!!

You are giving me hope in technical aspects video by video

Sridharkc_
Автор

Today i was studying for an interview.. and i was not understanding this concept.. thank you for this topic 🙏

ThePragyashree
Автор

Hello Ankit,
Thank you for making such insightful videos.
I want to ask a question here.
I have come across in a lot of interviews that they ask to solve a question without using a window function. Is there any trick to solving such questions? Can you provide us with an example.

khushishrivastava
Автор

I liked the explanation part
Thank u😊

nikhilmogre
Автор

Thanks Brother for the Continues great Work.
Just asking if you can start any GCP Engineering concepts also like Dataflow, composer

AdharshSunny
Автор

Hello Ankit,

We can also use Join by 'using' keyword.
For suppose, generally we write join like : a join b on a.id=b.id
So by using keyword we can write like: a join b using id
So many of them don't know that 'Using' keyword.
Can you please make a video on it.
And yeah i had used that first_value and last_value function

chillavenkatesh
Автор

Yet another great video Ankit. Just a doubt I had in the frame clause : last_value(emp_name) over(order by emp_age rows between current row and unbounded following)

last_value(emp_name) over(order by emp_age rows between unbounded preceding and unbounded following)

Both above frame clauses give same results, right?

clear_vision_