Clear explanation 💯 For those asking for dataset: create table employee( emp_id int, emp_name varchar(20), dept_id int, salary int ); insert into employee values(1,'Ankit',100,10000); insert into employee values(2,'Mohit',100,15000); insert into employee values(3,'Vikas',100,10000); insert into employee values(4,'Rohit',100,5000); insert into employee values(5,'Mudit',200,12000); insert into employee values(6,'Agam',200,12000); insert into employee values(7,'Sanjay',200,9000); insert into employee values(8,'Ashish',200,5000);
Very good explanation and easier to understand. Earlier I'm unable to understand difference between these 3 functions now I'm clear. Thank you so much for this video.
Very aptly explained. I was asked this window sql question in Gainwell interview. I couldn't answer as I were not aware of it. I searched for these functions and saw your video. It is very easily explained and very precise to the core.
I was looking for videos on Advance SQL but was still struggling with understanding the concepts. I really liked the explanation. It's time to practice a few questions ;) Thank you, can't wait for the next video :)
All are amazing videos.Very clear experience. It is very useful to refresh the SQL before interview.I am working as AVP in citicorp.Thank you very much Recently I used ur amazing videos to clear interview. Thank you very much.
create table emp( emp_id int, emp_name varchar(20), department_id int, salary int ); insert into employee values(1,'Ankit',100,10000); insert into employee values(2,'Mohit',100,15000); insert into employee values(3,'Vikas',100,10000); insert into employee values(4,'Rohit',100,5000); insert into employee values(5,'Mudit',200,12000); insert into employee values(6,'Agam',200,12000); insert into employee values(7,'Sanjay',200,9000); insert into employee values(8,'Ashish',200,5000);
Please can you maintain the English language only. Your content is very helpful & i think it will not benefit the larger audience if you speak any other language. You are a great teacher!!
great explanation and the best thing here is using small dataset to simplify concepts in a short span please help me why alias was added at the last to get output i want to visualize how it works.
Sir, @8:50 you got an error and then you fixed it with an alias. Could you please let me know why we need an alias(a) there?? I am a beginner and a little confused.. Please help!
Thanks for these..keep uploading and simplifying these concepts.. I hope to see some python,tableau content soon too.. Hope your channel reaches 100k fast..best wishes ..
Thank you so much 😊 I will start Tableau soon. I am thinking should I start with basic tutorials or direct scenario based questions just like SQL. Any suggestions?
To get highest salary..i gues you should use dense_rank. Because we need 3rd highest salary we can't fetch from this example which you have given...Am I right???
hello sir,i almost watch all of your videos and your videos have always given me useful insights.i'm an aspiring data analyst.i know the basic concepts of sql.i just want to know how to go on that next level where i can crack interviews with big companies.thank you
Thanks for explaining in such simple language . I have one doubt regarding the interview question can that be solved by simply using GROUP BY department with max(salary)
@@ankitbansal6 : Can we use this query to get the highest salary from each department and display all columns, sub-query might not be best option/optimized way, please take a look and advice. select emp_id, emp_name, department_id , salary from employee where salary in (select max(salary) from employee group by department_id )
Clear explanation 💯 For those asking for dataset:
create table employee(
emp_id int,
emp_name varchar(20),
dept_id int,
salary int
);
insert into employee values(1,'Ankit',100,10000);
insert into employee values(2,'Mohit',100,15000);
insert into employee values(3,'Vikas',100,10000);
insert into employee values(4,'Rohit',100,5000);
insert into employee values(5,'Mudit',200,12000);
insert into employee values(6,'Agam',200,12000);
insert into employee values(7,'Sanjay',200,9000);
insert into employee values(8,'Ashish',200,5000);
Thanks
u can insert using single insert query
create table employee(
emp_id int,
emp_name varchar(20),
dept_id int,
salary int
);
INSERT INTO employee (emp_id, emp_name, dept_id, salary)
VALUES (1, 'Ankit', 100, 10000),
(2, 'Mohit', 100, 15000),
(3, 'Vikas', 100, 10000),
(4, 'Rohit', 100, 5000),
(5, 'Mudit', 200, 12000),
(6, 'Agam', 200, 12000),
(7, 'Sanjay', 200, 9000),
(8, 'Ashish', 200, 5000);
This Explanation Blew my mind..!!
From Scaring.. To Caring..on SQL. its just because of u Guruji🙏🙏
Very good explanation, short and concise. It's the only video i would want to watch before my interview for quick revision.
Glad you liked it 😊
Very good explanation and easier to understand. Earlier I'm unable to understand difference between these 3 functions now I'm clear. Thank you so much for this video.
I didn't understand analytical function until I see this video.
Thank you for explain in simple word to understand. 👍
You are most welcome
Very aptly explained. I was asked this window sql question in Gainwell interview. I couldn't answer as I were not aware of it. I searched for these functions and saw your video. It is very easily explained and very precise to the core.
Absolutely good to watch with simpler explanations :-)
Explained to the point. Cleared the doubt related to the difference between these all the functions.
I was looking for videos on Advance SQL but was still struggling with understanding the concepts.
I really liked the explanation. It's time to practice a few questions ;)
Thank you, can't wait for the next video :)
Glad it was helpful!
Enjoy very topic you taught sir .. You have amazing teaching skill even these hard topic you cover very easily thank U
Thank you 😊
All are amazing videos.Very clear experience. It is very useful to refresh the SQL before interview.I am working as AVP in citicorp.Thank you very much Recently I used ur amazing videos to clear interview. Thank you very much.
Amazing explanation.
This is by far the best approach to teaching the windows function. SUBBED right away!
Thank you 😊
Enhancing clarity leads to an interest in learning. Thank you Ankit.. !
That's the simplest and most understandable explanation :) Thank You !!
Glad you liked it!
Very good explanation, short and concise
Glad it was helpful!
It's simple and easily understandable. I haven't even understood earlier from the top UA-camrs. Thanks for your efforts. Keep it up!
Thanks a ton
Thank you so much for all your videos and explaining in simpler language.All videos are very helpful 😊
Very nicely explained and in easy to understand. Great job!
Glad you enjoyed it!
💎 videos glad I founded it on UA-cam
Thankyou .After lots of watching videos finally my concept is cleared here.
Glad to hear that😊
neet work. nicely explianed. expecting more such videos. LIKED COMMMENTED & SUBSCRIBED.
An absolute no-nonsense guide to window functions!
Thanks bhaiyya ❤️
Thanks Amar for watching 🙂
Understood teh concept in a very simple way. Thank you :)
Great explained! looking forward for more videos
Thanks very much for the clarity and in detailed explanation of the concepts !
hatoff to big brother love from noida ................you cleared concept like piece of cake
Awesome
Really very good explanation sir! Thank you very much:)
Most welcome!
Thank you so much for your hard work. It's really very useful to understand the Analytical Functions.
Most welcome!
🥰my doubt is cleared Excellent Explaination about ranks thanks a lot👍
👏
Great video
short and good explanation in this video
Thanks. please continue the good work.
Thank you Ankit ! it was a very simple and clear explanation.
Glad you liked it
bhai thanks bht sahi and ez way me samjhaya apne
Hats off to your content👌👌
Such a simple explanation to these 3 functions. Thanks Ankit :)
Most welcome!
great video
Very good explanation.
Thankz ankit best explaination
Simply amazing. Thank you so much
It's very helpful Sir thank you please make more this types of vedio 😊
Keep watching
Very nicely explained!
Glad you liked it
apka...pehla subcriber hoo main.....bhaiya ...please bring lots of practical videos used in real time
Sure bro 🙂
Thanks Sir, very nicely explained..
Most welcome
Crisp and easy explanation Ankit bhaiya🫡
Keep watching
Good work bro well explained
Thank You Sir, Clear understood✌👌
Glad to hear that
Great Learning with you Ankit😊
It's my pleasure😊
Nice video!
well explained 💯💯
U explained very well
Thank you 😊
Clear explanation. waiting for next video
Thank you 😊
Same question asked in my yesterday interview 👍👍
Nicely explanation
Informative
Nice explanation
create table emp(
emp_id int,
emp_name varchar(20),
department_id int,
salary int
);
insert into employee values(1,'Ankit',100,10000);
insert into employee values(2,'Mohit',100,15000);
insert into employee values(3,'Vikas',100,10000);
insert into employee values(4,'Rohit',100,5000);
insert into employee values(5,'Mudit',200,12000);
insert into employee values(6,'Agam',200,12000);
insert into employee values(7,'Sanjay',200,9000);
insert into employee values(8,'Ashish',200,5000);
Thanks for create statement.
Please pin this comment so that someone who views this video can practice the same while learning. Thank you.
This is superb... I recently came across to your channel and it is really helpful😊
Teacher's should teach like you..
Thank you 😊
Well explained sir
Great explanation sir....tq
Keep watching
Very nice explanation
Keep watching
Please can you maintain the English language only. Your content is very helpful & i think it will not benefit the larger audience if you speak any other language. You are a great teacher!!
This is the only video in Hindi on my UA-cam channel
very good explanation 😊
Glad you liked it
clear explanation
Really helpful
Glad it helped👍
Thank you Ankit this was very easy to understand. Can you post some more interview questions using RANK(), DENSE RANK() and ROW_number
There are many in my complex SQL problems playlist
Great explanation Ankit. Keep on creating similar stuff, all the best!
Thank you 😊
Very nice videos. It cleared my concept around these functions. Thank you. Please let me know online where i can practise SQL queries.
Thank you. You can practice on the DataLemur website.
JUST WOW
Appreciated bro 👍
🤝
I found the entire video to be well explained. There is just one thing I need to understand
How did you know you had to use aliasing at 8:55?
Thanks alot sir✨
Most welcome
great explanation and the best thing here is using small dataset to simplify concepts in a short span
please help me why alias was added at the last to get output i want to visualize how it works.
In SQL server it is mandatory to give alias to a sub query
Great Explanation
Thank you 😊
Clear and Crisp
Nice video sir please upload more videos with interview questions
Sure
Sir, @8:50 you got an error and then you fixed it with an alias. Could you please let me know why we need an alias(a) there?? I am a beginner and a little confused.. Please help!
In SQL server you need to give alias to sub query
@@ankitbansal6 oh, I use MySQL, so I don't need to put alias, right?
@@samarjitmechie Alias is mandatory we have to give in mysql also
Thanks Ankit
THANK YOU MENAS A LOT
Thanks Bhaiya
Bro ye where clause vala kesey kiya ....mujmey to error show kr raha hai ki 'rnk unknown column in where clause
Thanks for these..keep uploading and simplifying these concepts..
I hope to see some python,tableau content soon too..
Hope your channel reaches 100k fast..best wishes ..
Thank you so much 😊 I will start Tableau soon. I am thinking should I start with basic tutorials or direct scenario based questions just like SQL. Any suggestions?
@@ankitbansal6 No no start with direct scenario based questions / case study. We are fed with Tutorials.
Nice video.
Thank you 😊
nicely explained, bro
Thanks bro 😊
All I want to say is, I LOVE YOU MAN
🙏
Thanks for the video!
You're welcome!
thanks for lecture, according to the last example , RANK( ) can't solve for the second highest salary provided by the department . am I right?
Thanku ♥️
Thankyou sir
Thanks for this!
Nice explanation.. I have a doubt performance wise rank or dense rank is better
Same performance
Good one Baba ji :)
🙂🙏
To get highest salary..i gues you should use dense_rank. Because we need 3rd highest salary we can't fetch from this example which you have given...Am I right???
Yes, for getting highest salary we should use dense_rank.
wanted to know if the records need to be sorted? or the partition function itself will take care of it ?
Order by will take care of sorting
Hi Ankit Bhai, if possible kindly create a video playlist on SQL how much it is required for Analytics domain.
Okay
hello sir,i almost watch all of your videos and your videos have always given me useful insights.i'm an aspiring data analyst.i know the basic concepts of sql.i just want to know how to go on that next level where i can crack interviews with big companies.thank you
Just solve my complex SQL playlist yourself
Thank You.
Thanks Ankit, can you please let me know how we will decide when to use rank(), dense_rank() and row_number()
It depends on business use case. There is no thumb rule as such.
@@ankitbansal6 thankyou
Thanks for explaining in such simple language . I have one doubt regarding the interview question can that be solved by simply using GROUP BY department with max(salary)
In that case you will get just max salary for each department but not other columns in the output
@@ankitbansal6 : Can we use this query to get the highest salary from each department and display all columns, sub-query might not be best option/optimized way, please take a look and advice.
select emp_id, emp_name, department_id , salary from employee where salary in
(select max(salary) from employee group by department_id )