SQL JOINS Interview Question | What does different SQL Joins return?
ฝัง
- เผยแพร่เมื่อ 17 พ.ค. 2024
- Given 2 tables, identify the no of records returned using different type of SQL Joins. This is a very frequently asked SQL Interview questions especially when a recruiter wants to test your knowledge on SQL joins, this is the kind of questions you can expect.
In this video, we shall look at 2 different datasets. Each dataset contains 2 tables which has duplicate data, null values etc. You are required to identify the no of records returned using INNER Join, LEFT Join, RIGHT Join, FULL JOIN, Natural Join and Cross Join. And you need to answer them without querying the tables.
Hence in order to answer such questions, you need to understand clearly how SQL internally performs different type of joins.
Download the dataset used in the video from my blog. Link below:
techtfq.com/blog/sql-joins-in...
Timestamp:
00:00 Intro
00:48 Understanding dataset from Scenario 1
01:35 Understanding INNER JOIN
06:03 Understanding LEFT JOIN
09:48 Understanding RIGHT JOIN
12:03 Understanding FULL OUTER JOIN
14:33 Understanding CROSS JOIN
15:58 Understanding NATURAL JOIN
19:35 Answering all JOINS result from Scenario 2 dataset
🔴 My Recommended courses 👇
✅ Learn complete SQL: learnsql.com/?ref=thoufiqmoha...
✅ Practice SQL Queries: www.stratascratch.com/?via=te...
✅ Learn Python: codebasics.io/courses/python-...
✅ Learn Power BI: codebasics.io/courses/power-b...
🔴 WATCH MORE VIDEOS HERE 👇
✅ SQL Tutorial - Basic concepts:
• SQL Tutorial - Basic c...
✅ SQL Tutorial - Intermediate concepts:
• SQL Tutorial - Interme...
✅ SQL Tutorial - Advance concepts:
• SQL Tutorial - Advance...
✅ Practice Solving Basic SQL Queries:
• Practice Solving BASIC...
✅ Practice Solving Intermediate SQL Queries:
• Practice Solving INTER...
✅ Practice Solving Complex SQL Queries:
• Practice Solving COMPL...
✅ Data Analytics Career guidance:
• Data Analytics career ...
✅ SQL Course, SQL Training Platform Recommendations:
• SQL Course / Training
✅ Python Tutorial:
• Python Tutorial
✅ Git and GitHub Tutorial:
• Git and GitHub
✅ Data Analytics Projects:
• Data Analytics Projects
THANK YOU,
Thoufiq
Have seen so many SQL videos on joins, no one has explained it like you. Will never forget the concept. Thanks so much for your hardwork and effort.
Couldn't agree more
@@thepratikjoshi44 +1
@@thepratikjoshi44 y so ?
Very true.
indeed, this video practically settles it all. I can be sure that I now understand SQL joins
Explanation is "at par". I don't think I'm gonna forget this JOINS concept in this lifetime. Thanks Taufiq !!
I generally dont comment on any videos, But I have to say i will never ever be confused about joins here onwards!! Gratitude!!
The way you explain SQL even layman can understand SQL kudos to your explanation
Thank you very much bro
Great help 😊 sir
I totally agree. It’s very clear. I would like to learn all filer/ criteria such as exclude some data in the table. Can you share the video? Thanks
The way you explain joins is more concise than any of the SQL videos I've seen... I finally understand how Joins work .... thanks to your explanation..!
I never seen this kind of clear explanation. After 7 years I am clear join concept. Thank you so much.
same here
Before I was very confused with JOINTS but after watching the video with the formulas, examples and explanation I’m very much clear now. Hat’s off and thank you.
I just came across this video, i figured out a internal logic of this on my own, did not know that this video existed. proud of figuring that out now
I have seen quite a few videos on Joins but this is probably the simplest and easiest way of understanding Joins. Kudos!!!
This will help in explaining joins in an Interview.
Keep up the good work 😀
I was searching for this type of join video with example from so many days . Thank you for how wonderfully u have explained...I didn't find anyone who is explaining like you... 🙏🙏
The way you explain the concepts it becomes easier to understand. which shows that the effort and hard work you put in to master the SQL.
Salute Sir. I watched hundreds of videos on sql join but only ur video clear all concepts on Joins. Salute Sir.
I love how you explain how SQL works, It's so clear anyone can understand it. I'm hoping that your next video would be on SQL optimization?
Cannot be more comprehensive than this. Thank You so much, Taufiq.
Thanks , searched for this content forever and finally after so long u made this video, one of its kind in most basic rules , really appreciate and please keep doing more of these videos, also nice that duplicate removing video has been made 😀
Please keep posting interview questions and concepts like these frequently..these are very helpful..and please start tutorials on power bi also if possible..❤️
I have come across so many SQL joins video but this has very keen explanation ,we cannot forget that in life time Thank you for your valuable teaching
FORMULAS FOR JOINS
💢
INNER JOIN = Inner join will only fetch the matching record from the opposite table you mentioned.
LEFT JOIN = Inner join + fetch any additional records from the left table which is not present in the right table.
RIGHT JOIN = Inner join + fetch any additional records from right table which is not present in left table.
FULL JOIN = Inner join + fetch any additional records from left table which is not present in right table + fetch any additional records from right table which is not present in left table.
TQ devraj
that was an ez and understandable explanation to grasp the concept at once :D
Cross Join = Match each record in the left table to each record in the right table Irrespective of the values.(Number of records in the left table * Number of records in the right table)
Seriously , You are best SQL teacher i have seen ever.
I was just watching this video randomly,just to brush up my concepts but I'd like to admit one thing for sure that when I learnt joins for the first time,I learned it in the Hard way.This is just some Brilliant stuff with extraordinary explanation👏
Man you've explained exactly what i needed to know. You've no idea how relieved i feel after finally understanding the concept of joins. I needed to understand how sql works with each record of each table and you've explained that really well. Thanks a lot brother for this video. I'll definitely subscribe to your channel.
I swear to God this explanation of Joins is the best one I've ever watched
This is one of the best videos on joins. I cannot thank you enough for this. 😊
Most Helpful video ever. I have been trying to study SQL for the past 6 years and no one and I mean no one from Kudvent to Udemy Courses taught this concept so beautifully. Thanks a lot. can't thank you enough,.
Kudos to you man . The way you explain will imprint in memory for long . I have seen many videos even if we doesnt know underlying concept but way you explained it was easier to grasp the working of solution. Keep sharing such amazing content.👌
Hats off Toufiq. No one can explain better than this. We have a great teacher in the form you, who will help us with more information even for the small inputs which we have given to you. Kudos 👌👌🤞🤞. Thank you once again...
I got this same question in my interview 5 years ago!! 👍👍very good explanation! Thank you!
man this video was simply awesome ! made me super confident about joins for my upcoming SQL interview !
Hi sir,
I was not able to get clear understanding about joins even I've watched and referred so many websites and TH-cam videos but finally I'm very glad and confident about joins after watching this video the way you explain with formula makes the whole scenario easy.
Thankyou so much for making great efforts to make the concepts understand easily
Very explanatory and reasonably short. Your videos are top ones. Great thanks!
I quite get confused with all the JOINS especially working with large data sets. The way you explained the JOINS is quite commendable especially the formula you have mentioned. I dont think I will ever forget this concept now. Thank you so much!!🙏
Thank you so much no one other has explained it so well it has been around 3 months i was learning SQL but got to know today that my understanding for inner join was very wrong .
Feeling glad that i came across you tutorials
Very clear I came across many SQL videos but this one could able to understand the right concept.
This is called a true education.... Thanks is a small word...❤❤
Likes * Infinity.
Very Simple and easy to understand. also providing the tables is a great idea as anyone can practice it without getting lazy to write insert query.
This was seriously needed. After watching this video my all doubts in joins got clear .
Have been seeeing so many sql videos to learn joins but no one can teach like this❤ kudoooooooos🎉
Asked similar question in my recent interview (inner, left, right, full outer, union, union all, intersect, minus). Thanks for sharing this video
This is my default question from last few years to all whom I interviewed to find if they are good at fundamentals.
I bet no interviewer can confuse me with this sort of question anymore. Thanks TFQ!!
Awesome session @Toufiq! Ur videos are always really informative!! I was asked 2nd scenario in an interview & at that time, I did not know that 2 nulls are never same & I gave the wrong answer. 😒 Hats off! 👍💓😍😍😍😍😍😍
I always learn from your tutorials...Thank you so much for the good work!
best way to explain joins i will never forget them in life time now
Trust me i got this concept cleat after alot of months. Bro u rocks.
Best explanation on TH-cam for Joins
you are seriously oms , you are giving knowledge which is not present anywhere over the internet and about concept salute sir 🙋♂
I have been so confused regarding when to use which one, this gave me so much clarity. Thank you for this wonderful lecture.
Great Explanation. Got Clarity on JOINS. Thank You So much
Sometimes topics are simple but you need a right guy to deliver it for you in a simple way.
You got a subscriber ❤
Finally cleared my concept of Joins.
Thanks
best sql channel, I must say,
I have failed the interview at noon, I wish i have seen your videos before the interview.
Best ever video ….and literally now i am clear with this natural join …thank you for sharing.
That was the best explaination, the formulas and how SQL works internally, thank you so much, please keep up the good work!
Bro, you are amazing, I would agree to many commenters here, the way you have explained it , joins seem so easy to understand. Do come up with many more awesome videos like this. GLAD WE ALL FOUND YOU!! hooked now sir.. :)
Even the one who created sql can't teach better than you about these concepts tq bro
Wow the way Toufiq explains is flawless 🤩
Hi Toufiq. now I clearly understood the join concept, please make video on query analysis and optimization.. I'm learning lot from you brother, keep up the great work 👍 👏
This video cleared all my confusion and very confident now to answer joins based qns. thank you so much
Clearly explained exactly 💯 good to watch
Best vdo on TH-cam about joins
Most awaited video. Honestly you are a pro in teaching....
seriously i have seen many videos on joins concept this the best video bro keep it up and THANK YOU
What a fantastic way way to explain. Thank you so much for sharing
I randomly find these video and after watching it was nice explanation and explain everything that was good no doubts remaining .Thanks
Your teaching style is superb. Very nicely explained. Thank you so much Taufiq.
Best join videos i saw till date❤ commendable work!!
I got exact idea on how joins are performed. I'm showing you gratitude sincerely. Thank you so much for this kind of explanation💥
Wow amazing thank you for the explanation I finally understand the way Joins work!!!! I'm super excited and thankful thank you again!!
Thank you so much for the explanation, now I got clarity on Joins
Best video ever made to explain SQL joins in a very simple and subtle way. Thankyou.
Correct brother ✅✔☑
'techTFQ' My favorite SQL teacher.
The best explanation for SQL joins. Thank you for this video👍🏿
Thanks for your explanation! Though i work with sql at my current job, watching this was pretty useful
Please keep making videos like these, it is really helpful for interviews
After watching this video i have cleared the join concepts. Thank You So much
Excellent way of explaining joins. Thank you.
Very clear explanation..You are exceptionally good.
I have a request, please do videos on external tables, Table partition and collections.
Crystal clear explanation. Thanks ❤
I have been looking out for this concept for a long time . Thank you for sharing this video
Explained very clearly bro 😊
Till now no one explained like you thank you atlast found a good video
I have answered 2nd table by pausing the video.and I checked with you I got the results same thank you so much guruji
Crisp and clear explanations!!
Thank you so much for joins video, finally I understand the joins in sql.
The concept was clearly explained and neat to understand
excellent explaination bro, before this video every time confusing on left right joins.
Bhai, video mast Laga🙏, all concepts are fully cleared. Love you bhai.... Laxmikant T.
just stumbled onto your video.. Siifuuu!! abang, i owe you a good nasi lemak when i visit KL. terima kasih
Sir I Love your teaching the way you explained with good understanding English... Thanks
Hats off to you sir
you are real Guru.
Beautifully Explained!
This was super super helpful and interesting ! Thank you so much!
Amazing! This one video is enough to understand joins.
Easiest way to understand joins.
thank you so much!! Finally I can say I understand joins!
Hi Sir, till now I had many confusions on Joins concept. But with your explanation my brain understood correctly, and I have created some examples like this, and I have answered the output correctly without writing the code. Thank you so much for clarifying this topic. If we can get this kind of explanations anywhere, I think we can have more coding developers right!!!!🤸♀🤸♀😎😎
The boss of explaining SQL
Thank you so much Sir for making joins to teach in very simple way
What an explanation. I was looking for such video. Great💯
Thank you for explaining the join concepts very clearly. Request to post the videos of all the concepts in SQL
explained in detailed way. Thanks a lot..its very clear