Joins in MySQL | Intermediate MySQL

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ธ.ค. 2024

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

  • @duurduranto
    @duurduranto 9 หลายเดือนก่อน +29

    i looked at several videos regarding joins and believe me, your way of explaining the topic is the best.

  • @dataandengineering
    @dataandengineering 4 หลายเดือนก่อน +15

    The summary for the outer join is :
    ○ LEFT JOIN
    § You take everything from the left table , and the matches of the right table
    ○ RIGHT JOIN
    § You take everything from the right table and the matches of the left table

  • @lifeasjt9584
    @lifeasjt9584 5 หลายเดือนก่อน +29

    6 minutes in and I already understand more than an online course I’m enrolled in. Subscribed!!😊

  • @kcmauceri
    @kcmauceri 7 หลายเดือนก่อน +11

    A gold mine of information. So happy I came across this boot camp.

  • @Mister_Garibaldi
    @Mister_Garibaldi 11 หลายเดือนก่อน +63

    Poor Leslie Knope isn't getting a present this year! 🤣

    • @AlexTheAnalyst
      @AlexTheAnalyst  11 หลายเดือนก่อน +7

      :(

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

      @@AlexTheAnalyst Why does craig show up in list 2, but not list 1? Is it because Ron isnt on list 1?

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

      What I wanna know is how Leslie is making more money even though Ron is her boss?

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

      @@RMIVfitness I make more than my bosses do. Though I am in a different industry.

    • @fatmanurJS
      @fatmanurJS 2 หลายเดือนก่อน

      @@AlexTheAnalyst 16:29 in here yes the department works fine but still salary employee id = 2 Ron is missing. So the table is missing the rows. So my question is why we didnt do right join in the first join code while joining multiple tables together? So instead of missing it we could have null value on dem table. idk it came to me more logical and feeling sth is wrong and missing infos with this way. ​ @AlexTheAnalyst

  • @alkhemist6631
    @alkhemist6631 7 หลายเดือนก่อน +5

    Glad im in the intermediate now. I doubt I understood everything in Beginner. I will go back and come when I understand 90% of it.

  • @aalanaa
    @aalanaa 2 หลายเดือนก่อน +1

    joins are used to combine rows from two or more tables based on a related column between them. types of joins:
    - INNER JOIN: Returns rows with matching values in both tables.
    - LEFT JOIN (LEFT OUTER JOIN): Returns all rows from the left table and matched rows from the right table. If no match, returns NULL for right table.
    - RIGHT JOIN (RIGHT OUTER JOIN): Similar to LEFT JOIN but returns all rows from the right table.
    - FULL OUTER JOIN: Returns rows when there is a match in either table, or NULL when no match exists.
    Each join serves different purposes based on the relationships between your data tables.

  • @MrKenneth009
    @MrKenneth009 5 หลายเดือนก่อน +9

    Ron Swanson redacting his birthday was a hilarious reference from the show hahaha

  • @ВаликБондаренко
    @ВаликБондаренко 22 วันที่ผ่านมา +1

    A hard piece of material, but it was explained in a very gentle manner.

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

    After years in a career as sports analyst. I've been looking for ages for a course to learn SQL et al to transition out. I have some knowledge of python, R and tableau from my sports analysis ventures but I just wanted to say thanks for making this so easy to follow and free. It's such a helpful resource when it can be a little overwhelming when trying to figure out where to start.
    Done the beginner section in 1 evening, moving onto the intermediate now :)

  • @futaba6461
    @futaba6461 2 หลายเดือนก่อน +1

    I didn't understand anything at first but then it all fell into place.
    thank you

  • @fredericnicholson80
    @fredericnicholson80 9 หลายเดือนก่อน +4

    Hi Alex, thanks for these great introductions. You present great examples that show the essential concepts. There is one topic though that I believe deserves some attention: The differences between the different SQL dialects. For example, If I compare this video to your intermediate SQL video on "Join", then mySQL seems to be missing the "full outer join" option.

  • @mohannadhazem5117
    @mohannadhazem5117 5 หลายเดือนก่อน +9

    been struggling to fuly understand joins for weeks until i stumpled on this boot camp, but in this self join xample i don't think Leslie got herself a secret santa 😂

  • @АртурКолован
    @АртурКолован 2 หลายเดือนก่อน

    the only SQL video that explains JOIN in plain english) thanks))

  • @nategraham3980
    @nategraham3980 3 หลายเดือนก่อน

    this was posted on my birthday! thumbs up January babies!

  • @paidtoshatter
    @paidtoshatter 2 หลายเดือนก่อน +1

    When adding columns to inner join. You have to specify a table so you put dem. Before the column name. What if you referenced the other table instead and did select sal.employee_id, age, occupation
    ?
    How will this change the resulting table when ran?

  • @taiebxr
    @taiebxr 6 หลายเดือนก่อน +2

    thank you for this, loved the beginner series- concise amd clear!

  • @NoluthandoMthethwa-ei9fp
    @NoluthandoMthethwa-ei9fp 7 หลายเดือนก่อน +7

    Thank you, this is so helpful I’m so happy I found this boot camp

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

      Are you in the ALX programme?

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

      @@palesampeExplore AI program

  • @abdur.ra8man
    @abdur.ra8man 11 หลายเดือนก่อน +4

    If you don't mind make videos about creating indexes, triggers, auto_increment in mysql

    • @AlexTheAnalyst
      @AlexTheAnalyst  11 หลายเดือนก่อน +6

      Some of those will be in the advanced series next :)

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

    The beginner videos were easy, and I thought I am too good at this, till I reached this video haha. It definitely got harder :D

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

      That's the beauty of SQL - always more to learn!

  • @RogerAmanna
    @RogerAmanna 4 หลายเดือนก่อน +3

    At 10:40 the +1 is added to the left table. But, when we run the query, it looks like the right table was added with one. How exactly does this work?

    • @RogerAmanna
      @RogerAmanna 4 หลายเดือนก่อน +6

      I found the answer to this. The join condition is emp1.employee_id + 1 = emp2.employee_id. This means that for every row in emp1, SQL will add 1 to the employee_id and then look for a match in emp2 where the employee_id equals this modified value.

    • @georgia_edits23
      @georgia_edits23 7 วันที่ผ่านมา

      ​@@RogerAmannaThank youu for writing your findings

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

    hello, as an aside from the great info, i have to give it up to you on your attention to detail to the parks and rec canon. not having ron swanson gave me a chuckle. great content, thank you for putting this out there!

  • @MikeJones-ql3db
    @MikeJones-ql3db 9 หลายเดือนก่อน +3

    Thanks a lot you make learning very easy

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

    Alex kindly make a playlist on azure.

  • @prejithalex4837
    @prejithalex4837 2 หลายเดือนก่อน +1

    In self join, Leslie is not assigned any Santa and Craig does have to buy any present. How to rectify that?

  • @momohtimothy6898
    @momohtimothy6898 6 หลายเดือนก่อน +1

    Exactly the information i want, clear and simple...straight to the point.

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

    Love your way teaching

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

    It's starts to get wild

  • @ShreyaSridharD
    @ShreyaSridharD 6 หลายเดือนก่อน +1

    As a huge fan of parks and rec i enjoy learning from these video : )

  • @abrahammoruti5967
    @abrahammoruti5967 11 หลายเดือนก่อน +6

    As a recruiter yourself Alex what level of skill set are you looking for when you're trying to look for a entry level analyst?

    • @AlexTheAnalyst
      @AlexTheAnalyst  11 หลายเดือนก่อน +13

      A solid concept up to Intermediate.

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

    Great lesson Alex. It's been quite some time since I practiced any sort of JOIN in any flavor of SQL. Great review! Thanks for your outstanding work. Cheers! 🤠

  • @Reddiitstories127
    @Reddiitstories127 21 วันที่ผ่านมา

    dept_id does not show up when query,
    select *
    FROM employee_salary
    ;
    But it does show up when query,
    select dept_id
    FROM employee_salary
    ;

  • @nicholasriha2039
    @nicholasriha2039 5 วันที่ผ่านมา

    Got it done thanks!

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

    Thank you ALEX for all you do.

  • @Mr.Arshad-oc1fd
    @Mr.Arshad-oc1fd 5 หลายเดือนก่อน

    On thing in my mind is that there is joining of two tables so the employee id column are showing double why should not there is only one employee id column

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

    lets put it in a logic gate
    INNER JOIN: AND GATE, IF ONE OF THE ROWS DOESNT EXIST WHILE THE OTHER DOES, ENTIRE THING GONE!!
    FULL OUTER JOIN: EVERYTHING
    LEFT OUTER JOIN:" OR gate where everything on the left will output but everything on the right will show NULL and everything on the right will only be shown if there are datas that have the same value as the values of the left
    RIGHT OUTER JOIN: VISE VERSA FOR LEFT OUTER JOIN

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

    JOINS
    inner join
    ->inner join simply joins two database tables based on
    ->just like AND gate
    [
    SELECT *
    FROM [chemical thermodynamic and polarizability table].[dbo].[Chemical] AS c
    INNER JOIN [SQL Tutorial].[dbo].[quantum_research_papers] AS q
    ON [SQL Tutorial].[dbo].[quantum_research_papers].categories = [chemical thermodynamic and polarizability table].[dbo].[Chemical].Energy;
    ]
    D1 denotes database 1 and D2 denotes database 2 will “merge” and excliude the databases that either of the tables do not have [simply the inner join] based on the common column name between the two databases tables
    Note:
    Its best to mention the [DATABASE_NAME].[dbo].[QUERY_NAME].column_name
    LEFT JOIN is like OR gate where everything on the left will output but everything on the right will show NULL and everything on the right will only be shown if there are datas that have the same value as the values of the left
    VISE VERSA FOR RIGHT JOIN
    FULL OUTER JOIN IS EVERYTHING LITERALLY

  • @HeinHtetAung-vh3uu
    @HeinHtetAung-vh3uu 4 หลายเดือนก่อน

    Thank you so much, Alex. Awesome lesson

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

    What kind of answer would you get from joining 3 tables? What would you do with the answer?

  • @amandaallen-ngbale4942
    @amandaallen-ngbale4942 25 วันที่ผ่านมา

    Can I ask ? during the self join how were you able to write employee_salary emp1 and used it in the ON statement emp1.employee_id without AS?

  • @sunnysisodhya
    @sunnysisodhya 11 หลายเดือนก่อน +2

    Hey I Was Looking For This Video Thanks

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

    Sir in 16:49, the last query you wrote, you have added alias names for first two tables but you haven’t added alias name for parks_dept table; instead you wrote as pd. Why ??

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

      pd is alias for parks_dept table ..we can directly write it after table name or can use "AS pd"

    • @mattchan5231
      @mattchan5231 2 หลายเดือนก่อน

      yeah seems to be used as a shortcut by skipping "AS" but I added that during my follow through so it makes sense to me

  • @andrecarmona4695
    @andrecarmona4695 2 วันที่ผ่านมา

    Hello, Done, Thank you so much.

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

    Sir I have a question..
    From where did I get that employee inputs or insights I don't have that
    I am simply implementing queries with any output
    Can you please help me with that??

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

    Sir should I Start my career in data analytics with python or sql

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

    I've completed all ur videos of this course till yet but didn't understand anything in sql. What the use of these functions in sql?

  • @oloy7038
    @oloy7038 2 หลายเดือนก่อน

    in the analyst builder course is it the same as this one or different? thank you for those who will answer :)

  • @MinatoJunior-hl8tb
    @MinatoJunior-hl8tb 11 หลายเดือนก่อน

    Hey can you make a video in how to download a program to practice data. Or is there a way for you to add it into your website for people to practice with data from outside like Jupyter but for sql

  • @EuropeLife-Style
    @EuropeLife-Style 6 หลายเดือนก่อน +1

    hello Sir Alex
    if I only write
    SELECT * FROM employee_demographics;
    its bring me Error have to write
    SELECT * FROM parks_and_recreation.employee_demographics;
    even if am inside demographics table.

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

      He goes over this in the fourth video of this bootcamp (Select Statement in MySQL) but you may have the wrong schema selected in the navigator section on the side, if the parks_and_recreation isn't bolded then the data will not be automatically pulled from that data set. Hopefully this helps and I explained it in a way that makes sense, I'm still new myself so if it's not that then I don't know lol

  • @RajuRomina
    @RajuRomina 2 หลายเดือนก่อน

    i can't find 3 dataset files

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

    Please I need help.. I don’t think I have the data for parks department

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

    Thanks for the lesson, I keep having error problem (1046), how do i resolved it.
    Thanks

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

    Is it alright if I don't get it in the first go?

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

    hey Alex do you still have the patreon page ?

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

    Hey, please bring more project based videos.

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

    Could you please let us know that can AI replace the data analytics job? I am going to end your course on data analytics but I have heard that soon AI can replace it. Thanks

  • @fatmanurJS
    @fatmanurJS 2 หลายเดือนก่อน

    16:29 in here yes the department works fine but still salary employee id = 2 Ron is missing. So the table is missing the rows. So my question is why we didnt do right join in the first join code while joining multiple tables together? So instead of missing it we could have null value on dem table. idk it came to me more logical and feeling sth is wrong and missing infos with this way. ​ @AlexTheAnalyst

  • @Rianne421
    @Rianne421 10 หลายเดือนก่อน +1

    Thanks this is great!

  • @Mr.Arshad-oc1fd
    @Mr.Arshad-oc1fd 5 หลายเดือนก่อน

    Hi sir thanks for this great unforgettable teaching us

  • @albertayeh-sarpong1264
    @albertayeh-sarpong1264 9 หลายเดือนก่อน

    Which version kf SQL is this

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

    Have you ever Prepared already for Trigger?

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

    where i can download these data

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

    I have notice something when he is renaming or assigning names, He uses AS sometimes and not in the others, Am I missing somthing?

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

      Pls refer to limit + aliasing inmy sql video....

  • @pragatheeshm.sc.577
    @pragatheeshm.sc.577 8 หลายเดือนก่อน

    Why are you deleting or hiding videos ?

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

    Sir, you've recommended Udemy and Coursera.... what about Analyst Builder for certification?

    • @AlexTheAnalyst
      @AlexTheAnalyst  11 หลายเดือนก่อน +3

      I think my courses are a little bit better than what you'll find on Udemy and there are practice questions integrated into the course too which Udemy doesn't have. It does have a Certificate at the end just like Udemy has :)

    • @jimieJimieMaverickstarz
      @jimieJimieMaverickstarz 3 หลายเดือนก่อน

      How much roughly your course fee​@@AlexTheAnalyst?

  • @mohdparvez9148
    @mohdparvez9148 3 หลายเดือนก่อน

    One problem though, the first employee Leslie doesn't have a secret Santa. I guess no gift for her this Christmas ;)

  • @NohablaEspnaol
    @NohablaEspnaol 3 หลายเดือนก่อน

    Thank you so much!

  • @Програмистпограмистев
    @Програмистпограмистев 2 หลายเดือนก่อน

    Thank you!

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

    Nahh. I think Mark got one. No santa for Leslie 😅😂

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

    Thanks Alex

  • @beslandaur7729
    @beslandaur7729 11 หลายเดือนก่อน +2

    “Let’s look at a very serious use case for self-join”…
    Proceeds to funding secret santa.
    But what’s the real purpose of self-join in a real-world? Why would you want to join a table to itself? Just trying to understand

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

      Honestly, the self join looks complicated to me.

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

    awesome...

  • @clarke6814
    @clarke6814 25 วันที่ผ่านมา

    ✅complete

  • @AjayAnkit-bt8cp
    @AjayAnkit-bt8cp 5 หลายเดือนก่อน +1

    indians attendence here🎉😂

  • @knygrs
    @knygrs 2 หลายเดือนก่อน

    done

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

    People just keep producing identical content on TH-cam. Quite a waste of time

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

    thank you so much Alex the Analyst

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

    @alextheanalysist how to get the two outputs in one query table i have tried but not getting the result and it showing database is not connected

  • @amrabdelatyfathallah2487
    @amrabdelatyfathallah2487 6 หลายเดือนก่อน +1

    can i ask a question in self join you add 1 ON emp1.employee_id + 1 = emp2.employee_id, However the one added to 'emp2.employee_id ' not 'emp1.employee_id ' ?
    and another question we apply here self join using inner join , he should return for me only matches emp_id, i mean
    2 Leslie Knope 2 Ron Swanson
    3 Ron Swanson 3 Tom Haverford
    4 Tom Haverford 4 April Ludgate
    5 April Ludgate 5 Jerry Gergich
    =======================================
    like this all over until he finished them why he returned for me like self join using left join like result appear in 13:00

    • @Online_store_finds
      @Online_store_finds 22 วันที่ผ่านมา

      Same question please anybody answer this

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

    At what point do you explain about EMP? 🥲

  • @HopeOverDebt
    @HopeOverDebt 2 หลายเดือนก่อน +1

    Correct me if i am wrong but this is what i understood ..........................
    3 TYPES OF JOINS :
    1. INNER JOIN
    2. OUTER JOIN [LEFT OUTER JOIN & RIGHT OUTER JOIN]
    3. SELF JOIN
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    1. INNER JOIN : RESULT WILL BE THE ONLY VALUES WHICH WILL MATCH IN BOTH TABLE1 & TABLE2 .
    2.1 OUTER JOIN [LEFT] : RETURNS ALL THE VALUES FROM LEFT AND RIGHT TABLE , BUT IF THERE ARE ANY MISSING VALUES FROM RIGHT TABLE THEN IT REPRESENTS THEM AS NULL INSTEAD OF DELETING THAT ROW .
    2.2 OUTER[RIGHT]: RETURNS ALL THE VALUES FROM RIGHT AND LEFT TABLE , BUT IF THERE ARE ANY MISSING VALUES FROM LEFT TABLE THEN IT REPRESENTS THEM AS NULL INSTEAD OF DELETING THAT ROW .
    3. SELF : THE TABLE IS JOINED WITHIN ITSELF [TABLE1, TABLE1 SITUATION ] OR SELF JOINED TABLES 🤔🤔

  • @chooselife2388
    @chooselife2388 19 วันที่ผ่านมา

    Thanks Alex