Тёмный

SQL Window Function with Example- RANK, DENSE RANK, ROW NUMBER, LEAD/LAG | SQL Tutorial in Hindi 14 

Rishabh Mishra
Подписаться 320 тыс.
Просмотров 190 тыс.
50% 1

Опубликовано:

 

1 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 308   
@NavneetKumar-n4p
@NavneetKumar-n4p Месяц назад
Pyspark playlist please..
@infotech5370
@infotech5370 6 месяцев назад
When we are using order by new_id , following is the output I am getting in contrast with the output shown in the video new_id new_cat Total 100 Agni 100 200 Agni 300 500 Dharti 500 700 Dharti 1200 200 Vayu 200 300 Vayu 500 500 Vayu 1000
@mdsarwaralam3485
@mdsarwaralam3485 Месяц назад
Removing the ORDER BY clause from the window functions in your query, give same output as in pdf Kindly, see below query- SELECT new_id, new_cat, SUM(new_id) OVER (PARTITION BY new_cat) AS "Total", AVG(new_id) OVER (PARTITION BY new_cat) AS "Average", COUNT(new_id) OVER (PARTITION BY new_cat) AS "Count", MIN(new_id) OVER (PARTITION BY new_cat) AS "Min", MAX(new_id) OVER (PARTITION BY new_cat) AS "Max" FROM test_data; or use- "ORDER BY new_cat" instead of "ORDER BY new_id" SELECT new_id, new_cat, SUM(new_id) OVER (PARTITION BY new_cat ORDER BY new_cat) AS "Total", AVG(new_id) OVER (PARTITION BY new_cat ORDER BY new_cat) AS "Average", COUNT(new_id) OVER (PARTITION BY new_cat ORDER BY new_cat) AS "Count", MIN(new_id) OVER (PARTITION BY new_cat ORDER BY new_cat) AS "Min", MAX(new_id) OVER (PARTITION BY new_cat ORDER BY new_cat) AS "Max" FROM test_data
@randomvideo7891
@randomvideo7891 Месяц назад
Thnx ​@@mdsarwaralam3485
@official_mahendra221
@official_mahendra221 Год назад
Rishab bhai, maine 80% sql apke videos se sikha hai, thanks .........thanks lot ..........lots of love !
@RishabhMishraOfficial
@RishabhMishraOfficial Год назад
Glad it was helpful ✅️
@tejasthete7007
@tejasthete7007 Год назад
It is really help full for me and i found roll model for data analyst thanks bro for enhance our skill, please Rishabh make a vedio on real time experience of data analyst project so that we can get clarity please.
@RishabhMishraOfficial
@RishabhMishraOfficial Год назад
Glad you liked it, thanks a lot. Yes i will make a complete video on how we analyze data using Python from scratch
@tejasthete7007
@tejasthete7007 Год назад
Thanks we will wait your movement
@labdhibavishi2430
@labdhibavishi2430 5 месяцев назад
Did you get a job?​@@tejasthete7007
@ambujtiwari4275
@ambujtiwari4275 9 месяцев назад
Bhai sach bta rha hu....ekdm izzat se padha aur smjha de rhe ho ❤
@RishabhMishraOfficial
@RishabhMishraOfficial 9 месяцев назад
Glad you liked it ✅️
@DeadlyGaming407
@DeadlyGaming407 6 месяцев назад
sir order by not working propely in partition why? I'm getting desired output when I'm not using order by
@abhinav10x
@abhinav10x 6 месяцев назад
Yes same issue I was facing, after removing 'Order By' it give result as shown in tutorial.
@RahulRana-jw3iv
@RahulRana-jw3iv 2 месяца назад
Me too
@Userlearner2229
@Userlearner2229 9 месяцев назад
"IZZAT SE CHALTA HAI" 😄😄😄 THANK YOU Rishabh Bhaiya , lot of thanks
@Ap.underscore
@Ap.underscore Год назад
To summarize, "Rank" leaves gaps if there are ties (same scores), while "Dense Rank" doesn't leave any gaps and keeps counting without skipping any numbers when there are ties.
@RishabhMishraOfficial
@RishabhMishraOfficial Год назад
Awesome 👌
@2010saumya
@2010saumya 9 месяцев назад
Unbounded preceeding and unbounded following ka meaning samaj nhi aya....woh kya kar raha hai
@SuhasiniBandiwar
@SuhasiniBandiwar Год назад
SELECT NEW_ID, LEAD(NEW_ID,2)OVER(ORDER BY NEW_ID) AS LEAD, LAG(NEW_ID,2)OVER(ORDER BY NEW_ID) AS LAG FROM TEST_DATA;
@adwaydandwate
@adwaydandwate 4 месяца назад
Hi Rishabh, thanks for your video. I see there is one discrepancy in output of first example: "Partition BY new_cat Order BY "new_id". This doesn't give the output as shown in the picture in the video. It has to be ordered by "new_cat" instead of "new_id", then you will get that output. Eg: Partition BY new_cat Order BY new_cat. Please try this once and let me know if am wrong here. Thanks!
@abhishekkumarjha2352
@abhishekkumarjha2352 4 месяца назад
good observation, with the query mentioned in the video we will get the cumulative sum in that group
@lokeshmoolya5569
@lokeshmoolya5569 21 день назад
6:57 What is difference betweeen group by and windows aggregate as both seems to be similar if we apply on particular rows
@RishabhMishraOfficial
@RishabhMishraOfficial 21 день назад
No no both are different. They have specific use case. When you will solve interview questions you will understand. Already uplaoded a video for that, Try solving interview questions on this channel.
@shraddhadhakad1154
@shraddhadhakad1154 9 месяцев назад
SELECT new_id, ROW_NUMBER() over(order by new_id) as "Row_Number", RANK() over(order by new_id) as "Rank", DENSE_RANK() over(order by new_id) as "Dense_Rank", PERCENT_RANK() over(order by new_id) as "Percent_Rank" FROM [practice_sd].[dbo].[windows function]
@Prernajain2730
@Prernajain2730 Год назад
CREATE TABLE LEADLEGG (NEW_ID INT); INSERT INTO LEADLEGG VALUES (100), (200), (200), (300), (500), (500), (700); SELECT * FROM LEADLEGG; SELECT NEW_ID, LEAD(NEW_ID,2) OVER (ORDER BY NEW_ID) AS LEADID, LAG(NEW_ID,2) OVER (ORDER BY NEW_ID) AS LEADIDS FROM LEADLEGG;
@Product25012
@Product25012 11 месяцев назад
At first a great thanks for ur explanation, Ekk Doubt h Hame kb smjh ayega ki window function use krna h ya normal sql query lgana h ......Plzzz Reply
@RishabhMishraOfficial
@RishabhMishraOfficial 11 месяцев назад
Practice n you will understand
@Markifreelancer
@Markifreelancer Месяц назад
Sir please give us the file so that we can practice 🙏🙏🙏🙏🙏🙏
@RishabhMishraOfficial
@RishabhMishraOfficial Месяц назад
Yess all files n notes are shared. Please go to my GitHub account it has all SQL resources
@Markifreelancer
@Markifreelancer Месяц назад
@@RishabhMishraOfficial sir I have checked your GitHub.. but those files are in CSV format I thik.? Do I have to use those CSV files or you have shared it in SQL format also? Sir please reply
@Markifreelancer
@Markifreelancer Месяц назад
@@RishabhMishraOfficial Sir i have checked your github but all files are in csv format.. this file is not present there..
@shraddhadhakad1154
@shraddhadhakad1154 9 месяцев назад
SELECT new_id, FIRST_VALUE(new_id) over(order by new_id) as "First_Value", LAST_VALUE(new_id) over(order by new_id) as "Last_Value", LEAD(new_id) over(order by new_id) as "Lead", LAG(new_id) over(order by new_id) as "LAG" FROM [practice_sd].[dbo].[windows function]
@AK47-666
@AK47-666 Месяц назад
Interviewer: what is the difference between rank and dense rank? Answer : dense rank ijjat se chalta hai
@RishabhMishraOfficial
@RishabhMishraOfficial Месяц назад
🤣
@aqawewewe
@aqawewewe 5 месяцев назад
Really liked your teaching style bro .. keep it up
@sadiqahassan
@sadiqahassan 4 месяца назад
Really liked your teaching style Mr. Rishabh Mishra Sir
@adarshjaiswal9457
@adarshjaiswal9457 8 дней назад
I'm Beginner in Data Analytics in some topic facing such issue and I'm searching such videos and also i'm studying from other tech youtuber but accidently i'm watching your videos and I'll appreciate you and your understanding or knowledge in Data Analytics and thank a lot for these free knowledge for giving us for building our Carrier Thankyou so Much ❤❤❤
@RishabhMishraOfficial
@RishabhMishraOfficial 8 дней назад
Glad you liked the content ✅️
@adarshjaiswal9457
@adarshjaiswal9457 5 дней назад
@@RishabhMishraOfficial You Just Said in SQL project album_table issue I'm also facing issue what can i do??
@shubhverma4579
@shubhverma4579 Год назад
sir! jab kuchh search krta hu sql ke liye hindi mein or apki shakal dikh jati hai tho search krna chhod deta hu kynki dil se ek hi awaz aati hai,"Bhai! hai tho apna." #Thanks_for_teach_us_sir
@lokeshdasariya1111
@lokeshdasariya1111 Год назад
In aggregation functions if i do Order by new_id then answer is different by your output sir after that i changed to Order by new_cat, output is same as per o/p table ... pls reply sir @rishabh mishra if i made a mistake
@pkabc3454
@pkabc3454 6 месяцев назад
in aggregate fiction ex:- after order by add new_cat not include new_id ,Because new_id result are 100,300 and new_cat result are 300,300
@vishalkumar-hi7wi
@vishalkumar-hi7wi 3 месяца назад
thx bro
@GovindBisht-le4xx
@GovindBisht-le4xx 2 месяца назад
same problem bro . if you get any solution please share with me
@hrishi2839
@hrishi2839 19 дней назад
Are thnxx brother, I thought I'm only one getting weard output
@kapilkumarkol1547
@kapilkumarkol1547 9 месяцев назад
assignment ans SELECT new_id, LEAD(new_id,2) OVER(ORDER BY new_id) AS "LEAD", LAG(new_id,2) OVER(ORDER BY new_id) AS "LAG" FROM testdata ;
@rishabhbisht8717
@rishabhbisht8717 Месяц назад
Solution for the Question asked: SELECT input_id, LAG(input_id, 2) OVER (ORDER BY input_id) AS lag, LEAD(input_id, 2) OVER (ORDER BY input_id) AS lead FROM your_table;
@RishabhMishraOfficial
@RishabhMishraOfficial Месяц назад
✅️
@rushikeshkharat4022
@rushikeshkharat4022 10 месяцев назад
isme cumulative sum wo sab bhi add kro. it is asked in interviews.
@RishabhMishraOfficial
@RishabhMishraOfficial 10 месяцев назад
Yess covered in sql interview questions video
@richakumari2509
@richakumari2509 2 дня назад
Your teaching style is really simple and up to the point!
@RishabhMishraOfficial
@RishabhMishraOfficial День назад
Glad you liked it ✅️
@Krishnagopal-45
@Krishnagopal-45 9 месяцев назад
SELECT NAME, LAG(NAME,2) OVER(ORDER BY NAME) AS "LAG_2", LEAD(NAME,2) OVER(ORDER BY NAME) AS "LEAD_2" FROM FRIENDS; This is the correct answer of your last question.👍👍👍👍
@ganeshn3800
@ganeshn3800 Год назад
we can use group by instead of partition by, is there any specific difference between these 2?
@111rhishishranjan2
@111rhishishranjan2 Год назад
Hello Bhaiya, Actually You forgot to make interview question videos related to window functions and LEAD/LAG and its been quite a while like 10 months , please do it, it would be much helpful for us because your explination is really great .
@RishabhMishraOfficial
@RishabhMishraOfficial Год назад
Noted ✅️
@shraddhadhakad1154
@shraddhadhakad1154 9 месяцев назад
SELECT new_id,new_cat, SUM(new_id) over(partition by new_cat order by new_id) as "Total", AVG(new_id) over(partition by new_cat order by new_id) as "Average", COUNT(new_id) over(partition by new_cat order by new_id) as "Count", MIN(new_id) over(partition by new_cat order by new_id) as "Minimum", MAX(new_id) over(partition by new_cat order by new_id) as "Maximum" FROM [practice_sd].[dbo].[windows function]
@dipanjansamanta111
@dipanjansamanta111 3 месяца назад
Bro full program do piz with schema
@vineetanand5341
@vineetanand5341 Год назад
Good Video. Please share share more videos with real Time example. Also 1 query, For functions like FIRST_VALUE, KST_VALUE, LEAD & LAG in select clause we can have more col's & function can be applied on any one col or more col also?
@AnjaliKumari-fz9lr
@AnjaliKumari-fz9lr 7 месяцев назад
Thanks for such a easy to understand video. ❤❤ Also I have se concern regarding data analyst job like ....is it necessary to know ML also or predictive modelling for this job??
@RishabhMishraOfficial
@RishabhMishraOfficial 7 месяцев назад
It's good to hv but not compulsory
@shraddhadhakad1154
@shraddhadhakad1154 9 месяцев назад
SELECT new_id,new_cat, sum(new_id) over(order by new_id rows between unbounded preceding and unbounded following) as "Total", AVG(new_id) over(order by new_id rows between unbounded preceding and unbounded following) as "Average", Count(new_id) over(order by new_id rows between unbounded preceding and unbounded following) as "Count", MIN(new_id) over(order by new_id rows between unbounded preceding and unbounded following) as "Minimum", MAX(new_id) over(order by new_id rows between unbounded preceding and unbounded following) as "Maximum" FROM [practice_sd].[dbo].[windows function]
@surajsidar3280
@surajsidar3280 3 месяца назад
Can you explain what is use of above query? What is ROWS clause
@abhinavbhoyar11
@abhinavbhoyar11 Год назад
I think it should be 'order by new_cat' instead of 'order by new_id' at 06:04 otherwise result will not be the same as shown.
@amrit_raj_dubey
@amrit_raj_dubey Год назад
Even I have commented same now 😂
@digitalatit7324
@digitalatit7324 2 месяца назад
I think that the ORDER BY clause is not to be used since i am gettig the different result....by using order by clause each line is getting calculted instead of the defined window.....please correct me if anybody is also getting the different result instead of the desired result .....i am talking about this section 6:32
@SHIVANISHARMA-zg7rd
@SHIVANISHARMA-zg7rd Год назад
Row clause smjh nhi aaya "rows b/w unbounded preceding and unbounded following" plz explain
@nehamegha3384
@nehamegha3384 Год назад
Thanku so much sir for the tutorial 🤩🤩🤩🤩 crystal clear explanation 😍😍😍😍 searching everywhere but finally got the best tutorial thanks alot
@RishabhMishraOfficial
@RishabhMishraOfficial Год назад
Glad it was helpful ✅️
@poojamankotia7353
@poojamankotia7353 Год назад
Hello, first of all your videos are really helpful, thankyou. Secondly, I am trying to run the Windows Aggregate func but its giving different input, kinldy help. Attaching the code and the output below: select new_id, new_cat, sum(new_id) over(partition by new_cat order by new_id)as "Total" new_id new_cat Total 100 Agni 100 200 Agni 300 700 Dharti 700 500 Dharti 500 200 Vayu 200 300 Vayu 500 500 Vayu 1000 from test_data
@vansaber
@vansaber 11 месяцев назад
If you remove the ORDER BY from the statement or ORDER BY new_cat then it will display exactly like in the video.
@amitsakhare17
@amitsakhare17 Год назад
Sir I wrote the same code as you do but still is given me error
@RishabhMishraOfficial
@RishabhMishraOfficial Год назад
Which code, pls share here
@ibrarmuhammad5621
@ibrarmuhammad5621 3 месяца назад
bro thanks a lot i am following your sql plylist this one your teaching is very good and iam from pakistan but i am facing an issue in window function when i use sum with window function it not working like yours its show first the low value in in the next value add both values in show the sum in the third row combine all the three and show the sum like not one unique value when u read my comment please guide me are tell me the name of mistake what iam doing so i can find some soulution on the internt
@automationwithwasi
@automationwithwasi Год назад
Thanks for the videos, very useful!! I got the answer to the question you asked without using the method. First, we will get the columns with lead and lag then apply the lead and lag again on those columns.🙃
@RishabhMishraOfficial
@RishabhMishraOfficial Год назад
Awesome, keep learning n keep growing 🚀
@zaid9183
@zaid9183 2 месяца назад
sir apne bola ki percent rank 0 se chau hoke jaha last walue wo 100% tak jayega lekin sir aisa nahi hai uska formula ye hai rank-1/no. of rows -1
@moonanaeem8445
@moonanaeem8445 Месяц назад
Ma data analyst ki job k liay one year say struggle kr rahi hon or one year say ap ko hi follow kr rahi hon but Mera interview clear nhi hota plzzz Meri help kran plzzz sir
@TejalByndla
@TejalByndla 2 месяца назад
Can you please show the slide properly because same content cannot been seen because of your video screening
@princekhunt13579
@princekhunt13579 Месяц назад
good content
@RishabhMishraOfficial
@RishabhMishraOfficial Месяц назад
Glad you liked ✅️
@NaeemShahzad-w2f
@NaeemShahzad-w2f 3 месяца назад
brother there are no csv files for this tutorial available on your github repository, please upload
@anuraggedam8117
@anuraggedam8117 7 месяцев назад
but why we are using windows functions in sql can anybody explain me??
@SaranV-q8o
@SaranV-q8o 7 дней назад
Can you please tell when to use window function while practicing sql
@DSCHsaxen
@DSCHsaxen 7 месяцев назад
all i taught is jee rank system in sql database when u taught window functions xd
@deepanshuchouhan-sm2pt
@deepanshuchouhan-sm2pt Месяц назад
Bhiya sabhi video samjh me aa gyi but windows function me kuch samjh nhi aaya
@dheerajkoranga5012
@dheerajkoranga5012 3 месяца назад
smooth like a smoothie :) before : window function is difficult to understand after this video: what! window function is sooo easy
@RishabhMishraOfficial
@RishabhMishraOfficial 3 месяца назад
Glad you liked ✅️
@LoveIsLifeTurkishIndia
@LoveIsLifeTurkishIndia 10 месяцев назад
So what is the window in the window fucntion ? Are partions windows ?
@diyadeb
@diyadeb 3 месяца назад
CREATE TABLE CUST (NEW_ID INT8 ); INSERT INTO CUST (NEW_ID ) VALUES (100, 200, 200, 300, 500, 500, 700); GEETING ERROR IN THIS CODE HOW TO MAKE THE TABLE PLEASE TELL ME
@himanshubhatt5562
@himanshubhatt5562 Год назад
brother thanx for such videos but please tell us where to practise window function and cte and i m not getting questions in it to practise
@RishabhMishraOfficial
@RishabhMishraOfficial Год назад
To practice questions, you can watch my playlist on sql interview questions and answers
@rubysrivastava2288
@rubysrivastava2288 Год назад
The output for the first query will be: new_id new_cat total 100 Agni 100 200 Agni 300 500 Dharti 500 700 Dharti 1200 200 Vayu 200 300 Vayu 500 500 Vayu 1000 Here, ORDER BY clause serves the dual purpose of sorting the data and calculating the cumulative sum or any other aggregate calculations within the window. @Rishabh please clarify here.
@RishabhMishraOfficial
@RishabhMishraOfficial Год назад
Here we have sorted the data based on category n total column. Eg- Agni house is sorted first as it starts with alphabet 'A' n then in agni house first value is 100 followed by 300 which is again sorted
@aseemanand1
@aseemanand1 11 месяцев назад
@@RishabhMishraOfficialman did you understand what she asked? She’s asking about the total column’s output. Shouldn’t it be the cumulative sum/running sum?
@ape789
@ape789 11 месяцев назад
Actually the order by should be below the from statement and outside the over clause. inside the over bracket it is working on cumulative way.
@poojadange9088
@poojadange9088 10 месяцев назад
@@ape789 yes if we did it in that way as u said it is working as normal sum not like cumulative
@adwaydandwate
@adwaydandwate 4 месяца назад
Hi Rishabh, I ran below queries however the output is same for both. Could you please check and explain once pls. Thanks! select new_id, first_value(new_id) over(order by new_id) First_Value, last_value(new_id) over(order by new_id) Last_Value, Lead(new_id) over(order by new_id) Lead, Lag(new_id) over(order by new_id) Lag from test_data; --WITH RBUPAUF (ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) select new_id, first_value(new_id) over(order by new_id ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) First_Value, last_value(new_id) over(order by new_id ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) Last_Value, Lead(new_id) over(order by new_id ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) Lead, Lag(new_id) over(order by new_id ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) Lag from test_data;
@KS0607
@KS0607 10 месяцев назад
"magar ye izzat se chalta hai" @13:22....lol
@CSAbhinay
@CSAbhinay 4 месяца назад
sir can you please share the ppt which you have used in the video @Rishabh Mishra sir
@anshuljain3105
@anshuljain3105 2 месяца назад
i have and interview and it helped me a lot
@RishabhMishraOfficial
@RishabhMishraOfficial 2 месяца назад
Awesome, keep learning n keep growing 🚀
@_k_a_m_a_l.
@_k_a_m_a_l. Год назад
@7:13 mins If you're doing sum on that window then why do you order it it's unnecessary
@hamza_Techy
@hamza_Techy Год назад
Great
@RishabhMishraOfficial
@RishabhMishraOfficial Год назад
Glad you liked ✅️
@hamza_Techy
@hamza_Techy Год назад
@@RishabhMishraOfficial Thanks
@eduzee2610
@eduzee2610 2 месяца назад
You could have explain things more breifly
@yashprashar8493
@yashprashar8493 9 месяцев назад
brother pls python ki vedios kb daloge placements start hone waali ha
@waheguruji44-x4c
@waheguruji44-x4c 2 дня назад
It's amazing lecture.
@RishabhMishraOfficial
@RishabhMishraOfficial День назад
Glad you liked ✅️
@dinkarjha4500
@dinkarjha4500 Год назад
Hi Risabh your first Querry after running in PostgreSQL Result showing different as per the Pdf sheet select * from test_dat select new_id, new_cat, sum(new_id) over(partition by new_cat order by new_id)as total from test_dat new_id new_cat Total 100 Agni 100 200 Agni 300 700 Dhart 700 500 Dharti 500 200 Vayu 200 300 Vayu 500 500 Vayu 1000
@dinkarjha4500
@dinkarjha4500 Год назад
As i observed should be new_cat in place of new_id
@realfacts3517
@realfacts3517 Год назад
Same
@RashidKhan-tz5ct
@RashidKhan-tz5ct Год назад
@@dinkarjha4500 Absolutely right
@poojamankotia7353
@poojamankotia7353 Год назад
@@dinkarjha4500 I am having the same results, what changes did you make?
@dinkarjha4500
@dinkarjha4500 Год назад
@@poojamankotia7353 compare shared query with pdf shared by Rishabh and result. partition by and order by both should be in new_cat in place of new_id.
@aamirzaman8310
@aamirzaman8310 3 месяца назад
very nice rishabh, itni mehnat karte ho to insert statement bhi de diya karo bhai :p 😜
@saeelsalvi1739
@saeelsalvi1739 Месяц назад
00:01 Windows functions apply aggregate, ranking, or analytic functions on a window 01:42 SQL window functions allow for aggregate operations over a set of rows. 05:03 SQL window functions summarize data for analysis. 06:41 SQL Window Functions can be used to partition and order data in SQL queries. 10:14 SQL window functions explained with examples 11:58 Understanding SQL Window Functions - RANK and DENSE RANK 15:13 Understanding SQL Window Functions - RANK, DENSE RANK, LEAD/LAG 16:50 Understanding the functionality of lead function in SQL Window Function 19:48 Understanding the functionalities of RANK, DENSE RANK, ROW NUMBER, LEAD, and LAG in SQL Window Functions 21:14 Understanding lead, lag, and window functions for interview preparation
@ramandeepsingh2782
@ramandeepsingh2782 5 месяцев назад
00:01 Windows functions apply aggregate, ranking, or analytic functions on a window 01:42 SQL window functions allow for aggregate operations over a set of rows. 05:03 SQL window functions summarize data for analysis. 06:41 SQL Window Functions can be used to partition and order data in SQL queries. 10:14 SQL window functions explained with examples 11:58 Understanding SQL Window Functions - RANK and DENSE RANK 15:13 Understanding SQL Window Functions - RANK, DENSE RANK, LEAD/LAG 16:50 Understanding the functionality of lead function in SQL Window Function 19:48 Understanding the functionalities of RANK, DENSE RANK, ROW NUMBER, LEAD, and LAG in SQL Window Functions 21:14 Understanding lead, lag, and window functions for interview preparation Crafted by Merlin AI.
@shubhu3533
@shubhu3533 4 месяца назад
bro informative video, but can you share test data file used in video
@shankysays
@shankysays 6 месяцев назад
we can do all this using group by and having too. correct?
@diyadeb
@diyadeb 3 месяца назад
How to make the table in the last assignment question
@gudiatoka
@gudiatoka 3 месяца назад
rowsBetwenn() bataya hi nai
@roymitul
@roymitul Год назад
Windows functions is also known as analytical functions ???
@RishabhMishraOfficial
@RishabhMishraOfficial Год назад
Yes you can say that. A window function, also known as an analytic function, computes values over a group of rows and returns a single result for each row. This is different from an aggregate function, which returns a single result for a group of rows.
@introvertwhiz-ll2ip
@introvertwhiz-ll2ip 2 месяца назад
Explanation superb, make him the professor of computer science Department.
@RishabhMishraOfficial
@RishabhMishraOfficial 2 месяца назад
Glad you liked the content ✅️
@sarjakmaniar369
@sarjakmaniar369 Год назад
Dense Rank - Magar yeh ijjat se chalta hai 😂 Loved the way of your teaching!! Thank you :)
@RishabhMishraOfficial
@RishabhMishraOfficial Год назад
Glad you liked ✅️
@Deepakyadav-dn1gg
@Deepakyadav-dn1gg Год назад
13:23 Ijjat se chalta hai dense rank.........waaah rishabh bhai
@ronakpatel8185
@ronakpatel8185 8 месяцев назад
In 6:57 the output is different from the expected output, so just remove the order by clause and u are good to go
@swarnimamishra7007
@swarnimamishra7007 7 месяцев назад
or use ORDER BY new_cat instead of new_id
@eddybear9436
@eddybear9436 7 месяцев назад
​@@swarnimamishra7007exactly. Ab sahi aa tha hai. Otherwise to Sum aur average me first value of I'd as it is print ho rhi thi
@sheetalmishra1258
@sheetalmishra1258 10 месяцев назад
Please explain partion by function
@Coconutgameplays
@Coconutgameplays 10 месяцев назад
sir if i apply sum function on new_id with the same values and same new_cat values i am getting an answer in total column as 100 and 300 while using same code plz tell me where am i making a mistake?
@Suhail06
@Suhail06 9 месяцев назад
same bro.. answer mila aapko?
@gokulsutar1696
@gokulsutar1696 Год назад
SELECT NEW_ID, LEAD(NEW_ID,2)OVER(ORDER BY NEW_ID) AS LEAD, LAG(NEW_ID,2)OVER(ORDER BY NEW_ID) AS LAG FROM TEST_DATA;
@suryajod9994
@suryajod9994 Год назад
erroe r coming while uploading csv file
@babumosai549
@babumosai549 Год назад
I have a qstn plz reply 🙏🙏 I did my graduation in BCA, should I do MCA, then look for a data science field or BCA is enough for job and future also??? Plz reply🙏🙏🙏🙏
@rajkumarkori7888
@rajkumarkori7888 6 месяцев назад
your explaination is good. however, you need to write the Query insted of directly pasting. if you write the query i belive your views will increase. thank you.
@sushd890
@sushd890 16 дней назад
Trying to learn sql to enter data analytics as i want to switch from Amazon seller support, Thank you bhaiya will try super hard to learn all the skillsets❤you have shared its a blessing for us
@sachinvaidya7842
@sachinvaidya7842 8 месяцев назад
Your explanation of almost all the concepts is very good, but I found very difficult to understand row between concept as it was not explained much, you should have elaborated it bit more.
@shubhambali4855
@shubhambali4855 8 месяцев назад
Please provide use case situations along with solution
@sandeepnarwal8782
@sandeepnarwal8782 8 месяцев назад
Great video.. but try to speak slower it will help to better understand the concept for beginners like me. Thanks :)
@baki_1205
@baki_1205 4 месяца назад
Superb @Rishabh Mishra sir❤
@ReviewwithAshish-qc8xb
@ReviewwithAshish-qc8xb Месяц назад
Rishabh bhai thank you so much. I am preparing for data analyst interview and your video's are helping me a lot to understand the SQL more easily
@saikatbagh8845
@saikatbagh8845 4 месяца назад
Window functions maintain the individual rows while also providing aggregate-like results.
@pankajkarn3674
@pankajkarn3674 Год назад
Hi Rishab Is there any video for pivot column data to rows
@RishabhMishraOfficial
@RishabhMishraOfficial Год назад
It's easy just drag n drop the column to column field list
@Vaishnavikaithwas786
@Vaishnavikaithwas786 3 месяца назад
Thanks for these superb explaination sir..... I will never forget these topic bcoz of ur wonderful teaching
@RishabhMishraOfficial
@RishabhMishraOfficial 3 месяца назад
Glad you liked ✅️
@MamataHati-e3m
@MamataHati-e3m 2 месяца назад
Thanks for this vdo
@RishabhMishraOfficial
@RishabhMishraOfficial 2 месяца назад
Glad you liked ✅️
@BollyCricNewzz
@BollyCricNewzz 10 месяцев назад
how we get percent rank
@amrit_raj_dubey
@amrit_raj_dubey Год назад
Example that you have given is bit wrong , while discussing Window function example Order by used can’t give exact answers as you show in table. Instead of Order by new_id need to use Order by new_cat. Hope you will change
@annusharma9622
@annusharma9622 Месяц назад
Thanks a lot sir ☺️
@RishabhMishraOfficial
@RishabhMishraOfficial Месяц назад
Glad you liked ✅️
@MuhammadSaleem-id2ye
@MuhammadSaleem-id2ye 4 месяца назад
Thanks and Love from Pakistan
@vaibhavpatharkar6794
@vaibhavpatharkar6794 Год назад
Bahut hi aaacha padhate ho aaap. U earned a subscriber and a like. Aaaap apna course shuru karo, minimal fees like 200 or 300 rakhlo. Aaur pura detail mein sql lo. Kyunki market mein log short course le rahe hai. Aur pura 6 ghanta le rahe hai, lekin usme 4 ghante ki advertisement kar rahe hai aur baaate kar rahe hai. Lekin 4 ghanta nahi padha rahe , sirf 2 ghanta pada rahe hai, masterclass mein. Uske wo 400 rs le rahe. Aur lakhon kama rahe , aur baccho se gaddari kar rahe hai. Aaap toh acche insan ho acche teacher ho , aaap masterclass lo , aur 6 ghanta mein sql khatam kar do. Let me add 1ce again , you teach very lucidly, especially the hindi language
Далее
Bearwolf - GODZILLA Пародия Beatrise
00:33
Просмотров 399 тыс.
Learn SQL + Database Concepts in 20 Minutes
24:34
Просмотров 64 тыс.