thank you thank you thank you so much sir i was left joinging 4 table with timestamp condition on where clause but you said in your video sometimes we have to use and instead of where and it worked thanks alot sir 😍
This is super helpful. I have been writing for SQL for 10+ years and this concept has always been one of the ones I haves struggled with. I really like this video and how you break it down. I would love to watch move videos like this or even other concepts because I like how you explain. Thanks and take care!
Hi Shoni, Thank you for the kind words. This is a common misunderstanding. I have a video that goes into details of the sequence in which the different clauses of the SELECT statement are evaluated. See m.th-cam.com/video/xTd1T2TxfOc/w-d-xo.html Do share in your network! Thank you.
very well explained ..i always thought adding more conditions in ON clause will give precise output but i was not getting desired output ..after seeing this i understood what mistake i was making
One issue is that a and c both will be matched in inner join condition and than b should come accordingly please check once at 6:40 timestamp. Please confirm once
Thank you for your kind words. Sorry, I do not have a course and do not plan on making any more SQL videos since there are many excellent ones out there already.
Hi Akshay, Thank you for the compliment. My videos are focused on concepts that are generally not so well explained by others. If there are good videos out there on a topic already, then I don't add value with yet another tutorial. Hope that makes sense.
I've had this question for some time. At first, I thought not including the "on" criteria (w/ the "and" criteria) in the execution step 2 was illogical, but in thinking about it now makes sense. How can you do the "and" when the first criteria ("on" statement) isn't met. Thank you!
Hello Sir, Can you please tell, which query performance is better considering the cost. Should we use the where condition before the join condition or after ?
I'm a little confused. I understand the difference explained by the video, but the final query for the ON example is really no different than a LEFT JOIN without the AND keyword and it's criteria (the query output would be the same if "AND C.CustomerID IN ('A', 'B')" wasn't even written in the code). As stated in the video, it fails to filter the record with CustomerID = C despite only filtering for CustomerID IN ('A', 'B'). Why would someone put the filter criteria with the ON keyword instead of within a WHERE clause if putting the filter criteria with the ON keyword fails to filter in the first place (unless that was the point of the video - to show that it doesn't work). Thanks in advance!
Hi Jyrrin, As you observed, the point of this video was to explain how different choices between ON vs WHERE work, so one can figure out what results to expect, or why a query is not producing the results that were intended. All of the videos in my series discuss very basic concepts, which are not well explained in other videos. For someone like you, who is further along in understanding SQL, these videos are probably too elementary, and not particularly useful. Thanks for your comment!
@@vigyaninctutorials-makingt6693 Thanks for your reply! I might have been overthinking it; but believe it or not, this video was very useful! Respectfully,
Could someone explain, why here th-cam.com/video/f9lbm7HA7pw/w-d-xo.html outer rows for C and B are added in for where Criteria in ON? We are performing LEFT JOIN, and in the first step INNER JOIN is executed, as explained, and then OUTER JOIN is executed as the second step. Isn't it meant "remaining outer part of the LEFT JOIN" by "OUTER JOIN" ?? Because condition in ON suggests: "...AND C.CustomerID IN ('A', 'B')". In A and B! Hence, per my understanding, only CustomerID of B should be added in this step to fulfil the condition, since A is already there. Not C and B. Why the row with C is added? Where do I go wrong?
thank you thank you thank you so much sir i was left joinging 4 table with timestamp condition on where clause but you said in your video sometimes we have to use and instead of where and it worked thanks alot sir 😍
Thank you. I am delighted that you found this video helpful. Check out my other SQL videos in the series.
It will be the best video for sure whoever wants clarity in where vs on. Thank you so much..great explanation step by step 🙏
This is super helpful. I have been writing for SQL for 10+ years and this concept has always been one of the ones I haves struggled with. I really like this video and how you break it down. I would love to watch move videos like this or even other concepts because I like how you explain. Thanks and take care!
Thanks for your kind words. Much appreciated. I'm happy this was helpful.
It is a bit confusing but the step-by-step explanation helps to understand! Thank u so much.
So clear! I've never thought about this!
Beautifully explained! Thank you!
excellent explanation!
I always thought that where clauses were evaluated first, thanks for the fine explanation.
Hi Shoni, Thank you for the kind words. This is a common misunderstanding. I have a video that goes into details of the sequence in which the different clauses of the SELECT statement are evaluated. See m.th-cam.com/video/xTd1T2TxfOc/w-d-xo.html Do share in your network! Thank you.
Really well explained, excellent tutorial. Thank you
Amazing Explanation. Thank you so much for your generosity.
Thank you for the kind words. Much appreciated.
Very useful video, you explain very well! Would be happy to see more of those videos in future :)))) Wish you health and happiness!
thanks for the whole series. This was enlightening.
Thank you for the kind words. Glad you found this useful.
This is great. Thank you Sir.
Very well explained thank you so much🙏
Extremely helpful.
This was exactly what I was looking for
Excellent video and well explained, with visual examples. Thank you very much!
Thank you for your kind words.
Very well Explained
Thank you for your kind words. Do check out my other SQL videos also.
thanks so much, i'm not confused anymore =)
Thank you very much for your video.
very well explained ..i always thought adding more conditions in ON clause will give precise output but i was not getting desired output ..after seeing this i understood what mistake i was making
Thank you. I'm so happy to hear that this video helped you! Be sure to also watch the other SQL videos in the collection.
This was really helpful! Thank you very much
Happy to hear that. Thank you.
Thank you so much! It helps a lot.
Thank you. Glad you found it useful. Check out the other videos, especially "How SQL joins work".
Amazing amazing explain
One issue is that a and c both will be matched in inner join condition and than b should come accordingly please check once at 6:40 timestamp. Please confirm once
Sorry , but I did not understand what your question is. Are you saying there is an error in what the video shows?
Awesome explanations, will you be making more videos on sql, mainly on advance sql? Or do you already have a course on other platforms?
Thank you for your kind words. Sorry, I do not have a course and do not plan on making any more SQL videos since there are many excellent ones out there already.
brilliant! thank you!
Glad you found this useful! Thanks.
Thank you for the video!!! Do you have examples real world situations of when to use each one?
This is the excellent tutorial sir. Just a question why did u stopped making video on SQL, please start making again
Hi Akshay, Thank you for the compliment. My videos are focused on concepts that are generally not so well explained by others. If there are good videos out there on a topic already, then I don't add value with yet another tutorial. Hope that makes sense.
Hi sir
How to contact you for training or guidance in databases?
Thanks for your videos very much. Worth true gold.
I've had this question for some time. At first, I thought not including the "on" criteria (w/ the "and" criteria) in the execution step 2 was illogical, but in thinking about it now makes sense. How can you do the "and" when the first criteria ("on" statement) isn't met. Thank you!
I'm happy you found the video helpful. Take a look at my other SQL videos too! Thanks.
Hello Sir, Can you please tell, which query performance is better considering the cost. Should we use the where condition before the join condition or after ?
I'm a little confused. I understand the difference explained by the video, but the final query for the ON example is really no different than a LEFT JOIN without the AND keyword and it's criteria (the query output would be the same if "AND C.CustomerID IN ('A', 'B')" wasn't even written in the code).
As stated in the video, it fails to filter the record with CustomerID = C despite only filtering for CustomerID IN ('A', 'B'). Why would someone put the filter criteria with the ON keyword instead of within a WHERE clause if putting the filter criteria with the ON keyword fails to filter in the first place (unless that was the point of the video - to show that it doesn't work).
Thanks in advance!
Hi Jyrrin, As you observed, the point of this video was to explain how different choices between ON vs WHERE work, so one can figure out what results to expect, or why a query is not producing the results that were intended. All of the videos in my series discuss very basic concepts, which are not well explained in other videos. For someone like you, who is further along in understanding SQL, these videos are probably too elementary, and not particularly useful. Thanks for your comment!
@@vigyaninctutorials-makingt6693 Thanks for your reply! I might have been overthinking it; but believe it or not, this video was very useful!
Respectfully,
Good Job... thanks
Thank you. Glad you found this video helpful. Check out my other SQL videos also!
Could someone explain, why here th-cam.com/video/f9lbm7HA7pw/w-d-xo.html outer rows for C and B are added in for where Criteria in ON? We are performing LEFT JOIN, and in the first step INNER JOIN is executed, as explained, and then OUTER JOIN is executed as the second step. Isn't it meant "remaining outer part of the LEFT JOIN" by "OUTER JOIN" ?? Because condition in ON suggests: "...AND C.CustomerID IN ('A', 'B')". In A and B! Hence, per my understanding, only CustomerID of B should be added in this step to fulfil the condition, since A is already there. Not C and B. Why the row with C is added?
Where do I go wrong?
I figured that out! It was all about C table, got it now!
Nice
Hey ..hi we are waiting for more videos...
Excellent
Thank you for the compliment!
Best !!
Thank you, Alok. Be sure to check out my other videos in this SQL series.
gold
Thank you!