Intermediate SQL Tutorial | Inner/Outer Joins | Use Cases

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ต.ค. 2024
  • Take my Full MySQL Course Here: bit.ly/3tqOipr
    In today's Intermediate SQL lesson we walk through Joins. Joins allow us to combine several tables, choose columns from each table, and use them in a single output.
    All Topics Covered: Joins, Unions, Case Statements, Updating/Deleting Data, Partition By, Data Types, Aliasing, Views, Having Clause, GetDate(), Primary vs Foreign Key
    ____________________________________________
    LINKS
    Joins image: www.got-it.ai/...
    ____________________________________________
    SUBSCRIBE!
    Do you want to become a Data Analyst? That's what this channel is all about! My goal is to help you learn everything you need in order to start your career or even switch your career into Data Analytics. Be sure to subscribe to not miss out on any content!
    ____________________________________________
    RESOURCES:
    Coursera Courses:
    Google Data Analyst Certification: coursera.pxf.i...
    Data Analysis with Python - coursera.pxf.i...
    IBM Data Analysis Specialization - coursera.pxf.i...
    Tableau Data Visualization - coursera.pxf.i...
    Udemy Courses:
    Python for Data Analysis and Visualization- bit.ly/3hhX4LX
    Statistics for Data Science - bit.ly/37jqDbq
    SQL for Data Analysts (SSMS) - bit.ly/3fkqEij
    Tableau A-Z - bit.ly/385lYvN
    Please note I may earn a small commission for any purchase through these links - Thanks for supporting the channel!
    ____________________________________________
    Websites:
    GitHub: github.com/Ale...
    ____________________________________________
    All opinions or statements in this video are my own and do not reflect the opinion of the company I work for or have ever worked for

ความคิดเห็น • 473

  • @AlexTheAnalyst
    @AlexTheAnalyst  4 ปีที่แล้ว +102

    TimeStamps:
    Inner Join - 2:08
    Outer Join - 4:08
    Use Cases - 11:17

    • @djfigmasta
      @djfigmasta 4 ปีที่แล้ว +1

      Hi,
      I want to add more skills in my work.
      I have a dumb question : "What the pros of SQL VS Excel(Pivot,Table and Query)"
      I watched many videos and still don't understand what so special about SQL. I personally found its just more coding and Excel it's more "clicking" if I can use that word.
      Hope you can help me to understand the Pros.
      Thanks,

    • @Soumchak96
      @Soumchak96 2 ปีที่แล้ว +10

      @@djfigmasta Excel is excellent but when it comes to big data or datasets excel may not handle that, now that's the point where SQL edges ahead.

    • @NoorAhmed-mf9gn
      @NoorAhmed-mf9gn ปีที่แล้ว

      Enjoyed the (use cases) so much. Thank you for your hard work

    • @mariaseri8352
      @mariaseri8352 11 หลายเดือนก่อน

      Thank you :)

    • @indirareddy8384
      @indirareddy8384 11 หลายเดือนก่อน

      i can see that there is some data you inserted in to after basic course

  • @cristianburich6828
    @cristianburich6828 3 ปีที่แล้ว +1060

    If anyone was looking for the new data in this video:
    Insert into EmployeeDemographics VALUES
    (1011, 'Ryan', 'Howard', 26, 'Male'),
    (NULL, 'Holly','Flax', NULL, 'Male'),
    (1013, 'Darryl', 'Philbin', NULL, 'Male')
    Insert into EmployeeSalary VALUES
    (1010, NULL, 47000),
    (NULL, 'Salesman', 43000)

    • @MrGpurse
      @MrGpurse 3 ปีที่แล้ว +39

      Thank you so so so much !!!! I was literally looking at those null's for the first 10 minutes of the video haha

    • @TheDefaultgameer
      @TheDefaultgameer 3 ปีที่แล้ว +3

      My Dude!: As I rather copy paste then add in by hand haha

    • @souravchavan7730
      @souravchavan7730 3 ปีที่แล้ว +6

      @@TheDefaultgameer I would suggest adding them using code. It would be a good revision.

    • @fritznanab
      @fritznanab 3 ปีที่แล้ว

      Thanks Mate

    • @pedropradocarvalho
      @pedropradocarvalho 3 ปีที่แล้ว +1

      thx friend, u'r a friend

  • @delightogwor3350
    @delightogwor3350 ปีที่แล้ว +65

    was going through an SQL course as part of a certification from a top company, watched the video on join 4 times couldn't understand, came to Alex's free boot camp, and understood in one go. Your my hero

  • @RandhawaAdi1995
    @RandhawaAdi1995 2 ปีที่แล้ว +73

    I have actually learned way more and remember concepts from your videos than the google certificate.

    • @Oluwagbeoyemiga
      @Oluwagbeoyemiga 2 ปีที่แล้ว +5

      Is it a better idea to go through Alex vidoes on SQL before taking Google Cert?

    • @RandhawaAdi1995
      @RandhawaAdi1995 2 ปีที่แล้ว +12

      @@Oluwagbeoyemiga I honestly felt the Google certificate was an extremely long intro to analytics class. Alex's videoes were straight to the point and way more informative

    • @deepakpal3972
      @deepakpal3972 ปีที่แล้ว +1

      @@RandhawaAdi1995actually yes.. data analyst courses are too long comparing to his video

    • @rosevandercapellen6418
      @rosevandercapellen6418 ปีที่แล้ว +6

      The Google course on joins is not very clear. Thank you for posting this! This helps a lot!

    • @diday22034
      @diday22034 ปีที่แล้ว

      This makes me feel better lol. I cannot spend more money at the moment.

  • @farhianesar5425
    @farhianesar5425 ปีที่แล้ว +15

    I was part of a paid bootcamp but I learned and understood the concepts a lot better from your free bootcamp than that paid one. Thanks a lot Alex. Highly appreciate your work.

  • @lizsilva3112
    @lizsilva3112 ปีที่แล้ว +29

    I cannot thank you enough for taking the time of sharing this with the rest of the world. You are very talented!

  • @fauzeeyaabubakarsadeeq8735
    @fauzeeyaabubakarsadeeq8735 ปีที่แล้ว +14

    I am done with the SQL Basics, moving to the intermediate, thank you so much Alex!

  • @nellyp6336
    @nellyp6336 8 หลายเดือนก่อน +1

    I tried many ways to understand the joins in a comprehensive way, but Alex was the only one that was properly explain it.
    Thanks Alex!!

  • @celebrityaccess9789
    @celebrityaccess9789 3 ปีที่แล้ว +5

    one of the best tutorial for data analyst on TH-cam. Been practicing the tutorial for a while now and figured the names used for the table was from my favorite show "the office". Thanks

  • @stevenjacobs2750
    @stevenjacobs2750 ปีที่แล้ว +9

    Really love your style with these videos. Using the office as a template for looking at these problems and techniques is such a fantastic way of going about it.

  • @jenineleonen
    @jenineleonen 6 หลายเดือนก่อน

    I have been using JOINS forever but this is the only time I officially understand it and will be able to explain it to others.

  • @OlayinkaOgunlade
    @OlayinkaOgunlade 7 หลายเดือนก่อน +1

    Understanding Joins in SQL has really been a challenge for me and I can say with this video, Its a solution. So exemplifying. Thanks Alex.

  • @vendetta2975
    @vendetta2975 7 หลายเดือนก่อน +1

    I've just came up after a online class beside that excellent explanation, as being a Office fan you made me smile. 😅

  • @rosinasharon4137
    @rosinasharon4137 11 หลายเดือนก่อน +1

    After struggling to understand joins today I came across this video and it was so simple and straight to the point . Shukran!

  • @polinat9771
    @polinat9771 ปีที่แล้ว

    I cannot thank you enough for this simple explanation. I nearly exhausted my resources for JOINs and nobody ever explained well enough for me to understand.

  • @leandroapgpb
    @leandroapgpb 3 ปีที่แล้ว +13

    Hi! Im Leandro from Argentina and I have just finished this lesson and please let me tell you that the practical and last part of the video was super clear and usefull. Keep up with the good work!

    • @AlexTheAnalyst
      @AlexTheAnalyst  3 ปีที่แล้ว +2

      Hey Leandro! I'm so glad to hear that! I plan on making quite a few more of these in the near future :)

  • @annessaolmos2582
    @annessaolmos2582 ปีที่แล้ว +3

    @AlexTheAnalyst, I want to take the time and thank you for making and sharing these videos. I am pursuing a degree in Information Systems, and I took a class in SQL, but your tutorial videos are easier to comprehend. I learned more in your short videos than I did in my class. You are amazing!!!!

  • @mwfuturemvp
    @mwfuturemvp 2 ปีที่แล้ว +7

    just finished google data analysis certification and im here for more practice, im loving the way you explain things , im feeling more confident

    • @MakaVLi-uf1kc
      @MakaVLi-uf1kc ปีที่แล้ว

      Hello and congratulations on completing your GDAC. I am also taking the course and on the 5th course which has been a bit difficult which i believe is because of the particular instructor. If you don't mind, can we get in contact somehow so i can learn a thing or two from you and i hope you are also able to learn from as well as i get better. I wish you all the best in your journey.

  • @marinavasileva340
    @marinavasileva340 7 หลายเดือนก่อน +3

    SOME TROUBLESHOOTING INFO, maybe for someone it will be helpful. Hi Alex! Thank you very much for the courses. The beginners course is great. When I moved on to intermediate I understood that Im stucked a bit. In MySQL for instance FULL OUTER JOIN doesn't work, only LEFT OUTER JOIN or RIGHT OUTER JOIN. Then I got that in this course you use SQL Server Management Studio. For such beginners as me It could be nice to get the information in the beginning, that you use a slightly different version. I managed to install the SQL Server MS. But sadly I can't download the database Parks_and_Recreation into the SQL Server MS. it shows different errors, so there is no posibility to try all commands you use in your video. Maybe you read this comment to help others. THANK YOU VERY MUCH FOR WHAT YOU ARE DOING! YOU ARE A GREAT MAN!!!

    • @cobe2013
      @cobe2013 7 หลายเดือนก่อน

      I agree with this comment. Maybe someone in the community can help.

    • @marinavasileva340
      @marinavasileva340 7 หลายเดือนก่อน

      @@cobe2013 Hi. So I started with this tutorial: th-cam.com/video/8vTCyhDyRjg/w-d-xo.html in order to know how to install the SQL Server and create the same table, using the script, as Alex has. It worked.

    • @marinavasileva340
      @marinavasileva340 7 หลายเดือนก่อน

      @@cobe2013 there is another guy who explains how to connect to the server, because I had this trouble earlier, I installed the app, but didn't know how to connect to the server: th-cam.com/video/7zXtA0LwoHs/w-d-xo.html. I hope it's helpful.

  • @avanthishermila
    @avanthishermila 5 หลายเดือนก่อน +2

    Great work Alex.. !! Thank you for this explanation 😊

  • @reynardtcloete6959
    @reynardtcloete6959 3 ปีที่แล้ว +1

    Bro, you explain things PROPERLY. Thank YOU.

  • @reemazabdull5623
    @reemazabdull5623 7 หลายเดือนก่อน

    Thank you! I am not an English speaker and I studied SQL during university, but I understood everything until now from you! Thank you Alex for this effort and for providing this content for free! I hope to use what I am learning in this Bootcamp in my career as a Data Analyst inshallah. And I loved how you gave Dwight a higher salary than The boss Michael. He would be happy if he knew that🤣 شكرًا أليكس

  • @VineetL-qc4yf
    @VineetL-qc4yf ปีที่แล้ว +1

    The explanation and diagram provided by you has nailed the concept in my brain

  • @criscatalan4288
    @criscatalan4288 3 ปีที่แล้ว +1

    To whoever thumbs down this video, BLESS YOU AND I HOPE YOU FIND PEACE!
    Thank you Alex for another wonderful lesson.

  • @Holu54
    @Holu54 3 ปีที่แล้ว +5

    Thanks Alex for all you do, you're such a good teacher. Cheers

  • @joshuaquayson1084
    @joshuaquayson1084 5 หลายเดือนก่อน

    You explain complex stuffs and make it very simple. Big ups man

  • @kumihuilu
    @kumihuilu 3 ปีที่แล้ว

    Watched the SQL Basics Tutorials and now on this in one day. Learned beter and faster and than in my school! cheers.

  • @freidkholy
    @freidkholy ปีที่แล้ว +4

    Before you start the video :
    Insert into EmployeeDemographics VALUES
    (null,'Holly','Flax',null,null)
    (1011,'Ryan','Howard',26,'Male'),
    (1013,'Darryl','Philbin',null,'Male')
    insert into EmployeeSalary values
    (1010,null,47000),
    (null,'Salesman',43000)

  • @palomaraissa8215
    @palomaraissa8215 6 หลายเดือนก่อน

    I spent two days trying to undertstand this, for some reason my head couldn't assimilate and i had to replay the video many many times, what helped me the most was to look for gifs explaining visually the join of two tables for each join type. Thanks for the video!

  • @marvhan888
    @marvhan888 ปีที่แล้ว +1

    Your choosing example Tables helps alot to understand the concepts. Great teacher

  • @prakashperam
    @prakashperam 3 ปีที่แล้ว +1

    It is one of the best tutorials. Crystal clear explanation with use cases.

  • @elena7533
    @elena7533 8 หลายเดือนก่อน

    Great video, as a beginner it was actually easy to understand the concept behind each join

  • @Benjamin-z3h6h
    @Benjamin-z3h6h ปีที่แล้ว

    I'm having a hard time to get a good understanding on JOINS. Now I think I'm starting to get there. Thank you Alex!

  • @zambifreak
    @zambifreak 2 ปีที่แล้ว +1

    Thank you for the easy to learn video. I knew some join basics but you enhanced my knowledge with your thorough explanations!

  • @peacejoshua5249
    @peacejoshua5249 6 หลายเดือนก่อน

    LOL didn't know we were working with the office character name til you mentioned Micheal Scott. This just became interesting!

  • @abdullahmirza7606
    @abdullahmirza7606 ปีที่แล้ว

    Teaching skill level: god
    You're the best Alex

  • @thecew30
    @thecew30 3 ปีที่แล้ว +17

    Thank you so much for your videos. I have been following you since November (I think) and you've been a huge part of my career change!! I am starting SQL this week in my data analytics bootcamp and I'm already struggling with JOIN 😓. Your videos are helping a lot! Also, I got a mug from your store, can't wait to receive it and start drinking my morning coffee out of it while coding. Who knows, maybe it will make everything clearer 😂

    • @AlexTheAnalyst
      @AlexTheAnalyst  3 ปีที่แล้ว +2

      So glad to hear it! And that's super cool! :D I really do use it for my morning coffee haha

  • @kellyluangrath2262
    @kellyluangrath2262 ปีที่แล้ว

    I’m so glad you explained what was the left and right table. I tried to Google and really couldn’t understand anyone’s explanation. But you made it so simple that I want to laugh at myself for not realizing the diff between left and right before. Thank you Alex

  • @nehuwanamuthuwa8773
    @nehuwanamuthuwa8773 2 ปีที่แล้ว +1

    So glad I found this channel helpful stuff ; you da man

  • @bluedreamerlife9281
    @bluedreamerlife9281 ปีที่แล้ว +6

    Very useful tutorials and the idea of the free Bootcamp is really great. I'm just so thankful for that, Alex. Keep up the good work!

  • @GabrielLoveraVzla
    @GabrielLoveraVzla 4 ปีที่แล้ว +1

    Really great material regarding Joins from SQL SERVER. Useful

  • @FemiDanalyst
    @FemiDanalyst ปีที่แล้ว

    Thank you for this great and informative teaching Alex. I call you my unseen mentor who is constantly showing me the part to greatness. One day, I would make you proud In Nigeria and every household will know your name. THANK YOU BOSS

  • @rudeboy6285
    @rudeboy6285 ปีที่แล้ว

    Took me a rewatch but I understand it now. Thanks Alex!

  • @mostinho7
    @mostinho7 3 ปีที่แล้ว +12

    5:00 full outer join joins from both tables (all rows from left table and all rows from right table, even if they don’t have a match in the other table, the columns are filled with nulls)
    Left outer join: return everything from left table, even when it doesn’t have match in right table, nulls are returned for the columns

    • @mariaseri8352
      @mariaseri8352 11 หลายเดือนก่อน

      Hello, im new to SQL , i tried but why there is no null in my table? :(please help

    • @Heyda_Marvin
      @Heyda_Marvin 11 หลายเดือนก่อน

      I've got same issue, have you managed to figure it out maybe?@@mariaseri8352

  • @elhammirzaei9684
    @elhammirzaei9684 ปีที่แล้ว

    The image for the join part was awesome. Thank you very much for the great content

  • @shanh54
    @shanh54 2 ปีที่แล้ว +1

    Alex thank you so so much. Im taking tje Google Analytics cert and you explained Joins easier. Plus being able to see the tables better helps.

  • @shokoofehheidari5345
    @shokoofehheidari5345 ปีที่แล้ว

    You are the best! Thank you very much to share this bootcamp for free

  • @felixpaul9272
    @felixpaul9272 9 หลายเดือนก่อน

    Love the way you use office characters

  • @notyouraveragedesi
    @notyouraveragedesi 6 หลายเดือนก่อน

    Nice and clear instructions! love it

  • @romanvasiura6705
    @romanvasiura6705 2 ปีที่แล้ว +1

    Thank you. Finaly I understand how to use Join(s) 😀

  • @oussamazaghouani9405
    @oussamazaghouani9405 6 หลายเดือนก่อน

    Sir Alex,
    First of all, thank you for these tutorials. They're very helpful.
    For the second use case, I suggest you may use FULL OUTER JOIN instead of INNER JOIN because there's a data from the table EmployeeSalary which is missing in your results (a salesman who has a salary = 43000).
    Thank you.

  • @anthonyd9043
    @anthonyd9043 ปีที่แล้ว

    Thank you Alex!
    Completed on April 2 2023

  • @erikaz6934
    @erikaz6934 3 ปีที่แล้ว +24

    Could you please provide us with the data set so that we are able to follow the steps with you? Thank you in advance!

  • @neonfuschia
    @neonfuschia 2 ปีที่แล้ว +1

    Absolutely excellent explanations. Thank you so much

  • @bumblebeemichelle
    @bumblebeemichelle 4 หลายเดือนก่อน

    Thank you so much, Alex!

  • @martinlupa8692
    @martinlupa8692 ปีที่แล้ว

    Best SQL tutorials on TH-cam. Super clear!

  • @merlynmathew3221
    @merlynmathew3221 3 ปีที่แล้ว +3

    Hey Alex,
    This is the best video on JOINS that I have come across. Simple yet all covered.
    Its Amazing !!! You made it so easy to understand !!

  • @gintomino4136
    @gintomino4136 2 ปีที่แล้ว

    This is the most helpful tutorial to understand Joins in sql. Very easy to understand the way you explain it. This is gonna help me at work coz I’m a newbie in sql. Thank you for sharing your knowledge!

  • @freesaints
    @freesaints ปีที่แล้ว

    Fantastic explanation of joins. Thanks!

  • @kelthekonqrr
    @kelthekonqrr ปีที่แล้ว +2

    Took the weekend off to practice the basic exercises on Stratascratch, back on for the intermediate ❤
    Crazy how stratascratch qualifies Joins/Unions as Easy/Beginner level

  • @MaríaFernandaRuiz-m4f
    @MaríaFernandaRuiz-m4f ปีที่แล้ว

    YOU'RE THE BEST ALEX. THAAANKS.

  • @kousikkumarvg5020
    @kousikkumarvg5020 8 หลายเดือนก่อน

    Thanks for ur clearcut explanation

  • @SinistralArcVI
    @SinistralArcVI 4 ปีที่แล้ว +1

    Haha I’ve been patiently waiting for this. Thanks so much

  • @brianyee3736
    @brianyee3736 2 ปีที่แล้ว

    This is great stuff! I plan on completing all of your lessons

  • @Tuuuuusssjjjjjjnrnfnnfnfn
    @Tuuuuusssjjjjjjnrnfnnfnfn 3 ปีที่แล้ว +2

    I'm loving this.. ❤

  • @mubashiraqeel9332
    @mubashiraqeel9332 3 ปีที่แล้ว +4

    I am waiting for the advanced part !

  • @thebusinessmajor6729
    @thebusinessmajor6729 2 ปีที่แล้ว

    Fantastic video Alex, the use cases were hilarious

  • @skyinvest6087
    @skyinvest6087 3 ปีที่แล้ว +1

    Man this is great really, I learned a lot with you and I am ready to learn even more. I am completing a bachelor degree in Finance but I wanted to change that since what I really liked about that field was the modeling aspect, I talked to my brother about that and he told me why don't you switch to data analysis or information system, I searched a lot of content on youtube and this channel is amazing, you're doing a great job, and motivated me to learn more about it being a data analyst and I hope I will make it in the future. Thank you for sharing your experience and your knowledge!!

    • @AlexTheAnalyst
      @AlexTheAnalyst  3 ปีที่แล้ว

      Hey Salim! So glad to hear that! Looks like you've watched some other videos as well :D Glad you're enjoying the channel!

  • @danielalcivar6395
    @danielalcivar6395 4 ปีที่แล้ว +2

    This is really helpful, thanks

  • @fauzeeyaabubakarsadeeq8735
    @fauzeeyaabubakarsadeeq8735 ปีที่แล้ว +1

    I have to go over this again

  • @jaberabedin5487
    @jaberabedin5487 2 ปีที่แล้ว

    I just HAD to make this comment - did not expect one of Michael Scott's genius ideas to make an appearance 😂😂My laughing fit probably woke up my roommate. ROFL LMAO Best. SQL Teacher. Ever.!!!

  • @ShinEKMG
    @ShinEKMG ปีที่แล้ว

    Hi Alex! I am really fortunate to have passed by a tiktok video that promoted your channel as one that offers learning guides in topics relating to data analytics. Being a person who would like to transition to data analytics at 32 years old, I still have doubts with regards to the unknown particularly on the things that still needs to be learnt. I have already finished your Power BI for Beginners and now into SQL. Though I have already finished the Khan Academy lessons on SQL, I found that there are difference in the codes used in SQLServer compared to I think SQLlite in Khan Academy. Like there we used "TEXT" instead of "varchar(50)" and also we use double-quotations instead of single quotations. Your explanation helped me a lot in understanding the concepts of LEFT OUTER JOIN, FULL OUTER JOIN, RIGHT-OUTER JOIN AND INNER JOIN. There's one thing I am not sure of though. Why was INNER JOIN used on the last example? IS it because we are performing some sort of data cleaning and did not use salary data which does not have an Employee Demographic? Kudos and more power on your channel.

  • @fatenabdulhamid7087
    @fatenabdulhamid7087 3 ปีที่แล้ว

    Thank you so much, your explanation is excellent.

  • @kumarrahul4584
    @kumarrahul4584 3 ปีที่แล้ว +1

    Great stuff Alex !

  • @muhammadadeel6626
    @muhammadadeel6626 3 ปีที่แล้ว +4

    loving your videos, very awesome and informative lessons. learning alot from your videos, make some videos on java

    • @AlexTheAnalyst
      @AlexTheAnalyst  3 ปีที่แล้ว +2

      I know some Java, but I don't know enough or use it enough to do videos on it to be honest..

  • @HarveySpecterYT
    @HarveySpecterYT 2 ปีที่แล้ว

    Thanks . You explained it very well and in simple terms.

  • @LucasLima-cq2ou
    @LucasLima-cq2ou 8 หลายเดือนก่อน +1

    How do you highlight, cut, paste so quickly? It looks like you're just clicking through your demos. It would be helpful to work more efficiently, "smarter not harder". Thank you for all your amazing, very accessible, and comprehensive work!

  • @sergioramos3437
    @sergioramos3437 3 ปีที่แล้ว +2

    "Thank you guys so much for JOINing me" I see what you did there

    • @AlexTheAnalyst
      @AlexTheAnalyst  3 ปีที่แล้ว +2

      lol an unintended yet enjoyable pun

  • @witch_busybody
    @witch_busybody 7 หลายเดือนก่อน

    I learned joins from the Google DA course through Coursera. This video is FAR better explaining it. However, Google's course touched on joins using different fields if you wanted to join 2 tables. Example: Lego Dataset, Star Wars builder sets table and parts table. Neither had the same column for an easy join like your employee demographics and employee salary example. Can you make a video explaining how to join tables with SIMILAR fields but not the same field? Thank you for all the videos you have put out!!

  • @riteshgaihre6277
    @riteshgaihre6277 9 หลายเดือนก่อน

    Alex the data ANALYST "HERO"

  • @erwindwisasrasasmita3072
    @erwindwisasrasasmita3072 ปีที่แล้ว

    Thank you so mucj Alex for all the Video

  • @WorkJob-g3o
    @WorkJob-g3o 9 หลายเดือนก่อน

    Thank you so much!!!

  • @quentinmcteer5993
    @quentinmcteer5993 3 ปีที่แล้ว +14

    Love your videos! However, in the final section here finding the average salary of a salesman you used an inner join which eliminated the salesman salary from the employeesalary table because it didn't have an employee ID. By not including the value (NULL, Salesman, 43000) , it skewed the average salesman salary by only evaluating those salesmen with matching employee ID's from both tables. Value should be 49750 not 52000 and you should have used a FULL OUTER JOIN instead.

    • @zacpaolo7845
      @zacpaolo7845 2 ปีที่แล้ว +6

      Not quite. From a purely SQL standpoint this would make sense but this highlights some bad database design here. No primary key in either table is specified. Employee ID should be the primary key and it should be both unique and not null. If it was the PK, then that entry with a salary and job title without an employee ID would not be there. In a real world scenario this may represent the salary of an employee no longer working at Dunder and would then skew the avg salesman salary by being included.

    • @Leopar525
      @Leopar525 2 ปีที่แล้ว

      @@zacpaolo7845 ohhh the burn :D

    • @The_DataGuy
      @The_DataGuy ปีที่แล้ว +1

      @@zacpaolo7845 In that case do you really think that joining is necessary here, you can just extract the avg salary from the employee salary table directly..

  • @islammounier1477
    @islammounier1477 ปีที่แล้ว

    Thank you for this video awesome explanation

  • @swathiashokan1591
    @swathiashokan1591 10 หลายเดือนก่อน

    Thank you alex.

  • @gideonnketiah-v5z
    @gideonnketiah-v5z ปีที่แล้ว +1

    Great Job Alex

  • @Nrsouth12
    @Nrsouth12 ปีที่แล้ว

    Great content learned a lot!!

  • @Vanquisher24
    @Vanquisher24 4 ปีที่แล้ว +1

    Very informative!!

  • @simozerrik6096
    @simozerrik6096 ปีที่แล้ว

    i think for the second case it's better to use Right Outer join because there is a salesman without an id in en the employeesalary table. thank's a lot for your teachings you are awesome.

  • @1689JeffChavez
    @1689JeffChavez ปีที่แล้ว

    On my journey through the boot camp...
    I learned a lot here especially when I got an error "...is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause."

  • @EMO_85
    @EMO_85 ปีที่แล้ว

    Thank you Alex. Your videos have really been helpful. I am done with the basics, now on intermediate.

  • @jessicabeckford9268
    @jessicabeckford9268 2 ปีที่แล้ว

    Love the explanation. I always had a hard time catching the differences between the join tables, your explanation made it very clear to understand. Loved the examples used at the very end of the video on how to utilize the tables to answer real-life problems.

  • @tanmayshelar2283
    @tanmayshelar2283 2 ปีที่แล้ว +1

    Absolutely amazing content, Alex!! Thank you so very much!

  • @Veo87
    @Veo87 3 ปีที่แล้ว

    Wow. This is really helping me understand joins. I use SQL Server Management Studio at work and have to know some SQL scripting for my job, but joins have been a little hard for me. This is helpful.

  • @tech_channel110
    @tech_channel110 11 หลายเดือนก่อน

    very well explained

  • @harshvardhanpatil8651
    @harshvardhanpatil8651 3 ปีที่แล้ว

    Simple and Great!!!!

  • @rondraughon5572
    @rondraughon5572 2 ปีที่แล้ว +11

    There are a lot more rows in the tables than there were in the previous video (and an extra table). Do you have a link for that code, so we can insert the values and add the table so we can follow along?

    • @sheyvitalismbunkur1949
      @sheyvitalismbunkur1949 ปีที่แล้ว +1

      If anyone was looking for the new data in this video:
      Insert into EmployeeDemographics VALUES
      (1011, 'Ryan', 'Howard', 26, 'Male'),
      (NULL, 'Holly','Flax', NULL, 'Male'),
      (1013, 'Darryl', 'Philbin', NULL, 'Male')
      Insert into EmployeeSalary VALUES
      (1010, NULL, 47000),
      (NULL, 'Salesman', 43000)

  • @baotranquoc5957
    @baotranquoc5957 4 ปีที่แล้ว +4

    hi, great video tutorial !!!! Im currently working in the field of Finance and wonder how much SQL should I learn to be comfortable in the field? I would be so glad to hear from your opinion. Tks for the tutorial anw.

    • @AlexTheAnalyst
      @AlexTheAnalyst  4 ปีที่แล้ว +1

      Bảo Trần Quốc I think to start go through the my basics guide and practice that until you feel confident in it. That is really the building blocks. The intermediate course is to take you to the next level with some more difficult topics, but the basics are used almost always while the next level topics aren’t always used. Hope that’s helpful! Good luck!

  • @prithvipradip8467
    @prithvipradip8467 3 ปีที่แล้ว +2

    Alex! Please do Bring on the advanced tutorials 🙏

    • @AlexTheAnalyst
      @AlexTheAnalyst  3 ปีที่แล้ว

      I already have some out! I'll have more coming out soon!

  • @chrisomoha636
    @chrisomoha636 10 หลายเดือนก่อน

    thanks alex.