title
SQL Joins Tutorial for Beginners - Inner Join, Left Join, Right Join, Full Outer Join
description
Learn how to create SQL Joins. The first 10 minutes teach you the basics. Inner Join, Left Outer Join, Right Outer Join, and Full Outer Join. The second 10 minutes show you are few techniques that will help you as you start building joins.
TABLE OF CONTENTS
00:00 - Intro
01:10 - INNER JOIN
04:20 - LEFT JOIN
07:03 - RIGHT JOIN
08:35 - FULL OUTER JOIN
09:36 - Optional OUTER Clause
10:38 - Alias the Join Tables
11:22 - Format SQL Join
11:55 - Filtering SQL Join in WHERE Clause
12:20 - Filter SQL OUTER Join in ON Clause
14:40 - Filter SQL INNER Join in ON Clause
15:30 - RIGHT JOIN can be changed to LEFT JOIN
READ THE ORIGINAL ARTICLE WITH THE TABLE SCRIPS
http://www.sqltrainingonline.com/sql-joins-tutorial-for-beginners/
YOUTUBE NEWS UPDATES
http://www.youtube.com/user/sqltrainingonline
VISIT SQLTRAININGONLINE.COM FOR TONS MORE VIDEO NEWS & TIPS
http://www.sqltrainingonline.com
SUBSCRIBE FOR OTHER SQL TIPS AND NEWS!
http://www.youtube.com/subscription_center?add_user=sqltrainingonline
SUBSCRIBE TO OUR EMAIL LIST!
http://www.sqltrainingonline.com
LET'S CONNECT!
Facebook: http://facebook.com/SQLTrainingOnline
Twitter: http://twitter.com/sql_by_joey
Linkedin: http://linkedin.com/in/joeyblue
SQLTrainingOnline: http://www.sqltrainingonline.com
detail
{'title': 'SQL Joins Tutorial for Beginners - Inner Join, Left Join, Right Join, Full Outer Join', 'heatmap': [{'end': 299.21, 'start': 185.897, 'weight': 0.805}, {'end': 350.923, 'start': 319.173, 'weight': 0.889}, {'end': 499.278, 'start': 485.024, 'weight': 0.747}, {'end': 615.454, 'start': 574.599, 'weight': 0.741}, {'end': 663.759, 'start': 617.736, 'weight': 0.738}, {'end': 735.301, 'start': 670.179, 'weight': 0.75}, {'end': 761.14, 'start': 736.241, 'weight': 0.726}], 'summary': 'Provides an in-depth understanding of sql server joins, including inner, left, right, and full outer joins, through venn diagrams and practical examples, showcasing their interactions and implications, with a focus on matching and non-matching records, and their impact on data analysis.', 'chapters': [{'end': 223.253, 'segs': [{'end': 29.993, 'src': 'embed', 'start': 0.23, 'weight': 0, 'content': [{'end': 5.231, 'text': "Today we're going to talk about SQL Server joins, inner, left, right, and full outer.", 'start': 0.23, 'duration': 5.001}, {'end': 15.122, 'text': 'Hey guys, Joey Blue here and today I want to talk about the types of SQL joins.', 'start': 9.437, 'duration': 5.685}, {'end': 18.584, 'text': "And you can see here I've got a picture.", 'start': 17.103, 'duration': 1.481}, {'end': 21.287, 'text': 'These are some Venn diagrams back from my math days.', 'start': 18.845, 'duration': 2.442}, {'end': 29.993, 'text': 'They really help to understand how the inner join, the left join, the right join, and the full join, how they interact with each other.', 'start': 22.067, 'duration': 7.926}], 'summary': 'Exploring sql server joins: inner, left, right, and full outer, with visual aids.', 'duration': 29.763, 'max_score': 0.23, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2HVMiPPuPIM/pics/2HVMiPPuPIM230.jpg'}, {'end': 139.511, 'src': 'embed', 'start': 58.74, 'weight': 1, 'content': [{'end': 64.2, 'text': "And we can take a look at both of these together so we can get a real good look at what's going on here.", 'start': 58.74, 'duration': 5.46}, {'end': 69.982, 'text': "So today what we're going to talk about first is the inner join.", 'start': 65.12, 'duration': 4.862}, {'end': 78.744, 'text': "So if I pull this up, what we have here in these Venn diagrams is we have a customer table, and it's this circle on the left.", 'start': 71.223, 'duration': 7.521}, {'end': 82.545, 'text': "And we have the city table, and it's a circle on the right.", 'start': 79.644, 'duration': 2.901}, {'end': 88.828, 'text': "Now on the inner join, we're going to get only the stuff that's in both tables.", 'start': 84.145, 'duration': 4.683}, {'end': 90.949, 'text': 'So the stuff that matches in both.', 'start': 89.288, 'duration': 1.661}, {'end': 92.79, 'text': 'And so what do I mean by that?', 'start': 91.689, 'duration': 1.101}, {'end': 102.094, 'text': 'So if we go back over here and look at our tables, we can see that the customer table is actually joining over to the city table by this city ID.', 'start': 93.13, 'duration': 8.964}, {'end': 109.418, 'text': 'And so what we have here is this first customer record, Bob Smith, has city of one.', 'start': 103.375, 'duration': 6.043}, {'end': 113, 'text': 'So that city of one corresponds over here to Kansas City.', 'start': 110.118, 'duration': 2.882}, {'end': 118.283, 'text': 'So those two will match, and when we do our inner join, we should get those records.', 'start': 114.201, 'duration': 4.082}, {'end': 125.426, 'text': 'Next, we have the second customer, which is Sally Smith, with a city ID of one.', 'start': 119.483, 'duration': 5.943}, {'end': 130.068, 'text': 'So Sally Smith, if we look over here, also lives in Kansas City.', 'start': 126.386, 'duration': 3.682}, {'end': 133.63, 'text': "That's a match, and so we'll get that record.", 'start': 130.747, 'duration': 2.883}, {'end': 139.511, 'text': 'So then we have Tom Smith, who has a city ID of 2.', 'start': 134.91, 'duration': 4.601}], 'summary': 'Explains inner join using venn diagrams and example data.', 'duration': 80.771, 'max_score': 58.74, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2HVMiPPuPIM/pics/2HVMiPPuPIM58740.jpg'}], 'start': 0.23, 'title': 'Sql server joins', 'summary': 'Provides an overview of sql server joins, including inner, left, right, and full outer joins, illustrated through venn diagrams and simplified tables, aiming to understand their interactions and practical implications. it also explains the process of performing an inner join on a city table to match customer records based on city ids, resulting in the retrieval of matching records while excluding non-matching ones, illustrated through examples with quantifiable data and discusses the process of using an inner join in sql to combine data from two tables.', 'chapters': [{'end': 109.418, 'start': 0.23, 'title': 'Understanding sql server joins', 'summary': 'Provides an overview of sql server joins, including inner, left, right, and full outer joins, illustrated through venn diagrams and simplified tables, aiming to understand their interactions and practical implications.', 'duration': 109.188, 'highlights': ['The chapter explains the concept of inner join, illustrating through Venn diagrams how it retrieves only the data that is common in both tables, facilitating practical understanding of the concept.', 'The chapter introduces the types of SQL joins, including inner, left, right, and full outer, and provides visual aids such as Venn diagrams and simplified tables to aid in comprehension.', 'Joey Blue uses Venn diagrams and simplified tables to illustrate the inner join concept, demonstrating how it retrieves data that exists in both tables, enhancing the practical understanding of the inner join operation.', 'Joey Blue uses Venn diagrams to visually represent the inner join operation, emphasizing its function of retrieving data that exists in both tables, facilitating a clear understanding of the concept.']}, {'end': 163.338, 'start': 110.118, 'title': 'Inner join explanation', 'summary': 'Explains the process of performing an inner join on a city table to match customer records based on city ids, resulting in the retrieval of matching records while excluding non-matching ones, illustrated through examples with quantifiable data.', 'duration': 53.22, 'highlights': ['The inner join process is explained using specific examples, such as matching city IDs for customers, resulting in a clear understanding of the inner join operation.', 'The examples of matching and non-matching records, such as Sally Smith living in Kansas City with a city ID of 1 and Mary Smith not having a matching city ID, provide concrete instances of the inner join outcomes.', 'The detailed explanation of how the inner join retrieves matching records while excluding non-matching ones, demonstrated through the analysis of customer and city data, enhances the understanding of the inner join operation.']}, {'end': 223.253, 'start': 164.319, 'title': 'Sql inner join explained', 'summary': 'Explains the process of using an inner join in sql to combine data from two tables, illustrating the query with an example and discussing the expected outcome.', 'duration': 58.934, 'highlights': ["The process of using an inner join in SQL to combine data from two tables is explained, providing a clear example of a query involving a 'customer' table and a 'city' table.", 'The expected outcome of the inner join query is discussed, with a specific mention of the number of records expected to match the join condition.', "The requirement for a match between the city IDs in the 'customer' and 'city' tables is emphasized, with an example illustrating the matching process and an exception scenario involving Mary Smith."]}], 'duration': 223.023, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2HVMiPPuPIM/pics/2HVMiPPuPIM230.jpg', 'highlights': ['The chapter introduces the types of SQL joins, including inner, left, right, and full outer, and provides visual aids such as Venn diagrams and simplified tables to aid in comprehension.', 'The chapter explains the concept of inner join, illustrating through Venn diagrams how it retrieves only the data that is common in both tables, facilitating practical understanding of the concept.', 'The inner join process is explained using specific examples, such as matching city IDs for customers, resulting in a clear understanding of the inner join operation.', 'The detailed explanation of how the inner join retrieves matching records while excluding non-matching ones, demonstrated through the analysis of customer and city data, enhances the understanding of the inner join operation.', "The process of using an inner join in SQL to combine data from two tables is explained, providing a clear example of a query involving a 'customer' table and a 'city' table.", 'The examples of matching and non-matching records, such as Sally Smith living in Kansas City with a city ID of 1 and Mary Smith not having a matching city ID, provide concrete instances of the inner join outcomes.', 'Joey Blue uses Venn diagrams and simplified tables to illustrate the inner join concept, demonstrating how it retrieves data that exists in both tables, enhancing the practical understanding of the inner join operation.']}, {'end': 472.874, 'segs': [{'end': 350.923, 'src': 'heatmap', 'start': 306.235, 'weight': 0, 'content': [{'end': 310.318, 'text': 'So in this case, we already know the matches because we got that on the inner join.', 'start': 306.235, 'duration': 4.083}, {'end': 314.501, 'text': 'But we also want to get this other record of Mary Smith.', 'start': 311.619, 'duration': 2.882}, {'end': 317.724, 'text': "And Mary doesn't have a match to city.", 'start': 315.722, 'duration': 2.002}, {'end': 331.68, 'text': "Okay, so let's go ahead and change this query to say left join and let's run this.", 'start': 319.173, 'duration': 12.507}, {'end': 339.135, 'text': "So now what we're getting, we got the first three records.", 'start': 335.712, 'duration': 3.423}, {'end': 343.598, 'text': 'So the first three records are the exact same as the inner join.', 'start': 339.175, 'duration': 4.423}, {'end': 350.923, 'text': "So if we look back over here, those first three records when we did an inner join are this intersection part that's blue.", 'start': 344.939, 'duration': 5.984}], 'summary': 'Query changed to left join, retrieving 3 unmatched records.', 'duration': 37.363, 'max_score': 306.235, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2HVMiPPuPIM/pics/2HVMiPPuPIM306235.jpg'}, {'end': 421.132, 'src': 'embed', 'start': 392.965, 'weight': 1, 'content': [{'end': 395.106, 'text': "So that's exactly what that means.", 'start': 392.965, 'duration': 2.141}, {'end': 403.168, 'text': "So a left join will give you everything on this side, on the left side of the join clause, even if it doesn't exist in city.", 'start': 395.146, 'duration': 8.022}, {'end': 409.525, 'text': "And if we switch these around, we're going to get a different answer.", 'start': 405.243, 'duration': 4.282}, {'end': 410.626, 'text': "But I don't want to do that just yet.", 'start': 409.545, 'duration': 1.081}, {'end': 413.988, 'text': "So let's switch over now.", 'start': 411.947, 'duration': 2.041}, {'end': 416.209, 'text': "And let's take a look at the right join.", 'start': 414.008, 'duration': 2.201}, {'end': 421.132, 'text': 'On the right join, we want to get the intersection.', 'start': 417.67, 'duration': 3.462}], 'summary': 'Explaining left and right join behavior in sql.', 'duration': 28.167, 'max_score': 392.965, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2HVMiPPuPIM/pics/2HVMiPPuPIM392965.jpg'}], 'start': 224.854, 'title': 'Understanding sql joins', 'summary': 'Explains inner join and left join in sql, showcasing their results and differences, and also provides insights into the importance of including non-matching data and the differences in results in data analysis.', 'chapters': [{'end': 392.585, 'start': 224.854, 'title': 'Understanding inner and left joins', 'summary': 'Discusses the concepts of inner join and left join, demonstrating the results of each type of join and highlighting the differences in the matching and non-matching records, with a focus on the inner join and its usage in data analysis.', 'duration': 167.731, 'highlights': ['The inner join results in three records, representing the matching data from both tables, demonstrating the concept of only obtaining the matches in the result set.', 'The left join yields the same three records as the inner join, representing the matching data, along with an additional non-matching record from the left table, exemplifying the inclusion of non-matching records in the result set.', "The left join allows for the retrieval of all matches from the left table and includes non-matching records, such as the case of 'Mary Smith' not having a city match, resulting in a total of four records in the output."]}, {'end': 472.874, 'start': 392.965, 'title': 'Understanding joins in sql', 'summary': 'Provides an explanation of left join and right join in sql, demonstrating how they retrieve data from tables using examples and comparisons, highlighting the importance of including non-matching data and the differences in results.', 'duration': 79.909, 'highlights': ["Left join retrieves everything from the left side of the join clause, even if it doesn't exist in the joined table, showcasing the importance of including non-matching data.", 'Right join retrieves the intersection of the inner join as well as the non-matching data from the right table, exemplified by retrieving a city without a customer attached to it, emphasizing the differences in results compared to left join.']}], 'duration': 248.02, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2HVMiPPuPIM/pics/2HVMiPPuPIM224854.jpg', 'highlights': ['The left join allows for the retrieval of all matches from the left table and includes non-matching records, resulting in a total of four records in the output.', 'Right join retrieves the intersection of the inner join as well as the non-matching data from the right table, emphasizing the differences in results compared to left join.', 'The inner join results in three records, representing the matching data from both tables, demonstrating the concept of only obtaining the matches in the result set.', 'The left join yields the same three records as the inner join, representing the matching data, along with an additional non-matching record from the left table, exemplifying the inclusion of non-matching records in the result set.']}, {'end': 1079.686, 'segs': [{'end': 514.869, 'src': 'heatmap', 'start': 485.024, 'weight': 0.747, 'content': [{'end': 488.227, 'text': "So let's come over here, change this to a right join.", 'start': 485.024, 'duration': 3.203}, {'end': 492.773, 'text': 'And let me run that.', 'start': 491.132, 'duration': 1.641}, {'end': 496.396, 'text': "So now you're seeing we picked up all the people that match.", 'start': 494.194, 'duration': 2.202}, {'end': 499.278, 'text': 'So these first three rows we picked up the whole time.', 'start': 496.416, 'duration': 2.862}, {'end': 502.42, 'text': 'We picked up on the inner join and the left join and now on the right join.', 'start': 499.298, 'duration': 3.122}, {'end': 507.704, 'text': "But we're also picking up this one city that doesn't have a customer.", 'start': 503.361, 'duration': 4.343}, {'end': 514.869, 'text': "So that leads us to the final join we're going to talk about today.", 'start': 510.846, 'duration': 4.023}], 'summary': 'Switched to a right join, picked up all matching people, including a city without a customer.', 'duration': 29.845, 'max_score': 485.024, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2HVMiPPuPIM/pics/2HVMiPPuPIM485024.jpg'}, {'end': 615.454, 'src': 'heatmap', 'start': 574.599, 'weight': 0.741, 'content': [{'end': 576.801, 'text': "There's a couple other things I want to say about them real quick.", 'start': 574.599, 'duration': 2.202}, {'end': 580.665, 'text': "One, I've left out a couple of things that can really help you too.", 'start': 577.682, 'duration': 2.983}, {'end': 591.015, 'text': "So whenever you're doing like a left join, first of all, it's the full syntax is left outer join.", 'start': 581.626, 'duration': 9.389}, {'end': 595.393, 'text': 'So if I run that, that runs also.', 'start': 593.149, 'duration': 2.244}, {'end': 599.919, 'text': "Outer is an optional word, so you don't have to put it in there.", 'start': 596.354, 'duration': 3.565}, {'end': 602.784, 'text': 'But if you like it and it makes more sense to you, you can.', 'start': 600.58, 'duration': 2.204}, {'end': 604.526, 'text': 'You can do the same thing with the right.', 'start': 603.084, 'duration': 1.442}, {'end': 605.568, 'text': "It's a right outer join.", 'start': 604.546, 'duration': 1.022}, {'end': 615.454, 'text': 'or you can do a full outer join and you get the outer part, because when you go back to this description,', 'start': 607.188, 'duration': 8.266}], 'summary': 'Explains options for left join: left outer join, outer optional, right outer join, and full outer join.', 'duration': 40.855, 'max_score': 574.599, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2HVMiPPuPIM/pics/2HVMiPPuPIM574599.jpg'}, {'end': 663.759, 'src': 'heatmap', 'start': 617.736, 'weight': 0.738, 'content': [{'end': 623.461, 'text': 'So we got the right outer, we got the left outer, we got the just inner.', 'start': 617.736, 'duration': 5.725}, {'end': 627.564, 'text': "So all we're getting is the intersection and the full outer is going to give you stuff on both sides.", 'start': 623.741, 'duration': 3.823}, {'end': 630.346, 'text': "So now that's optional.", 'start': 629.245, 'duration': 1.101}, {'end': 634.798, 'text': "So let's take it out because it's optional.", 'start': 632.017, 'duration': 2.781}, {'end': 639.4, 'text': "Now we can also alias our tables and this is you're going to want to do this a lot.", 'start': 635.659, 'duration': 3.741}, {'end': 653.528, 'text': 'So if I alias this as CS for customer and I alias this and let me go ahead and put as and I alias city as cy for city.', 'start': 639.56, 'duration': 13.968}, {'end': 663.759, 'text': "So once you've aliased this as cy, you can come in here and you can do cs for customer and you can do cy for city.", 'start': 654.629, 'duration': 9.13}], 'summary': 'The transcript discusses different types of joins and table aliasing in sql.', 'duration': 46.023, 'max_score': 617.736, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2HVMiPPuPIM/pics/2HVMiPPuPIM617736.jpg'}, {'end': 663.759, 'src': 'embed', 'start': 632.017, 'weight': 6, 'content': [{'end': 634.798, 'text': "So let's take it out because it's optional.", 'start': 632.017, 'duration': 2.781}, {'end': 639.4, 'text': "Now we can also alias our tables and this is you're going to want to do this a lot.", 'start': 635.659, 'duration': 3.741}, {'end': 653.528, 'text': 'So if I alias this as CS for customer and I alias this and let me go ahead and put as and I alias city as cy for city.', 'start': 639.56, 'duration': 13.968}, {'end': 663.759, 'text': "So once you've aliased this as cy, you can come in here and you can do cs for customer and you can do cy for city.", 'start': 654.629, 'duration': 9.13}], 'summary': "Using table aliases, 'cs' for customer and 'cy' for city, simplifies querying and enhances efficiency.", 'duration': 31.742, 'max_score': 632.017, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2HVMiPPuPIM/pics/2HVMiPPuPIM632017.jpg'}, {'end': 735.301, 'src': 'heatmap', 'start': 670.179, 'weight': 0.75, 'content': [{'end': 678.151, 'text': "And now that we're inline here, we also probably, now that you know what a left and a right is, I usually format these a little better.", 'start': 670.179, 'duration': 7.972}, {'end': 680.415, 'text': "So let's go back and let's just do a left join.", 'start': 678.372, 'duration': 2.043}, {'end': 688.636, 'text': "And now I've got a little better syntax so I can see it and I can even do my from clause on a new line.", 'start': 682.894, 'duration': 5.742}, {'end': 691.037, 'text': "And so that's going to run.", 'start': 690.016, 'duration': 1.021}, {'end': 697.079, 'text': 'You can also come in here and you can say, I want all the columns from my customer, cs.star.', 'start': 691.857, 'duration': 5.222}, {'end': 705.246, 'text': 'And then you can say, I only want cy.cityname.', 'start': 699.082, 'duration': 6.164}, {'end': 706.627, 'text': "I don't want the ID to show up.", 'start': 705.366, 'duration': 1.261}, {'end': 710.549, 'text': 'So you can specify what columns you want up in the select clause.', 'start': 707.527, 'duration': 3.022}, {'end': 714.472, 'text': "And then also, let's talk about filtering.", 'start': 711.77, 'duration': 2.702}, {'end': 718.374, 'text': "So here I've got a left join from customer to city.", 'start': 714.992, 'duration': 3.382}, {'end': 723.997, 'text': 'And what if I want to go ahead and do a filter on the city name?', 'start': 719.395, 'duration': 4.602}, {'end': 735.301, 'text': 'So you can still use the where clause and you can say where cy.cityname equals to Kansas city.', 'start': 725.057, 'duration': 10.244}], 'summary': 'Demonstration of sql query with left join, column selection, and filtering.', 'duration': 65.122, 'max_score': 670.179, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2HVMiPPuPIM/pics/2HVMiPPuPIM670179.jpg'}, {'end': 768.634, 'src': 'heatmap', 'start': 736.241, 'weight': 0.726, 'content': [{'end': 738.062, 'text': 'So you can still do a where clause on this.', 'start': 736.241, 'duration': 1.821}, {'end': 741.643, 'text': 'and it will filter.', 'start': 740.842, 'duration': 0.801}, {'end': 749.149, 'text': 'You can also do a WHERE clause up here, but you get a slightly different answer.', 'start': 742.644, 'duration': 6.505}, {'end': 761.14, 'text': "So if I do where the city IDs match and where cy.cityName equals Kansas City, let's see what our answer is.", 'start': 749.229, 'duration': 11.911}, {'end': 768.634, 'text': 'So this is the one error you may get on the outer join.', 'start': 764.432, 'duration': 4.202}], 'summary': 'Demonstrates sql where clause usage, including city id matching and error handling.', 'duration': 32.393, 'max_score': 736.241, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2HVMiPPuPIM/pics/2HVMiPPuPIM736241.jpg'}, {'end': 859.65, 'src': 'embed', 'start': 821.488, 'weight': 5, 'content': [{'end': 822.831, 'text': "So now this is what we're looking at.", 'start': 821.488, 'duration': 1.343}, {'end': 831.206, 'text': 'So if we look at this and do a left join, you can see that a left join will get all four rows.', 'start': 823.291, 'duration': 7.915}, {'end': 839.797, 'text': "but we're only going to get the city name for this one city ID because it thinks hey,", 'start': 831.206, 'duration': 8.591}, {'end': 843.399, 'text': "there's no other cities in this table because we filtered it on the on clause.", 'start': 839.797, 'duration': 3.602}, {'end': 848.923, 'text': 'So this will filter your table before the join happens.', 'start': 844.52, 'duration': 4.403}, {'end': 859.65, 'text': "So it's like you have this instead of what we originally had, which is we had three cities, and so we picked up New York on Tom Smith.", 'start': 849.643, 'duration': 10.007}], 'summary': 'Left join retrieves all four rows but filters the table before the join, resulting in picking up new york on tom smith.', 'duration': 38.162, 'max_score': 821.488, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2HVMiPPuPIM/pics/2HVMiPPuPIM821488.jpg'}, {'end': 1067.611, 'src': 'embed', 'start': 1024.644, 'weight': 0, 'content': [{'end': 1026.345, 'text': 'And so you can rearrange these.', 'start': 1024.644, 'duration': 1.701}, {'end': 1028.806, 'text': 'The left and the right join are basically the same thing.', 'start': 1026.385, 'duration': 2.421}, {'end': 1030.686, 'text': 'It all depends on where you put these tables.', 'start': 1028.886, 'duration': 1.8}, {'end': 1033.108, 'text': "So let's do a quick recap.", 'start': 1032.108, 'duration': 1}, {'end': 1035.47, 'text': 'So we talked about the inner join.', 'start': 1033.848, 'duration': 1.622}, {'end': 1041.673, 'text': 'The inner join is simply an intersection between the two tables, so where everything matches.', 'start': 1035.67, 'duration': 6.003}, {'end': 1047.616, 'text': "We've got a left join, which gives you everything that matches, plus anything on the left side that does not match.", 'start': 1042.434, 'duration': 5.182}, {'end': 1055.842, 'text': "The right joint gives you all the matches plus anything on the right side that doesn't match with the left side.", 'start': 1048.797, 'duration': 7.045}, {'end': 1062.047, 'text': "And then the full outer joint gives you all from both sides even if they don't have matches.", 'start': 1056.563, 'duration': 5.484}, {'end': 1066.069, 'text': "So that's really it for the joins.", 'start': 1063.746, 'duration': 2.323}, {'end': 1067.611, 'text': "There's a few advanced joins.", 'start': 1066.149, 'duration': 1.462}], 'summary': 'Explained inner, left, right, and full outer joins in sql with clear examples.', 'duration': 42.967, 'max_score': 1024.644, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2HVMiPPuPIM/pics/2HVMiPPuPIM1024644.jpg'}], 'start': 474.436, 'title': 'Understanding sql joins', 'summary': 'Explains the concepts of inner join, left join, right join, and full outer join in sql, emphasizing their functions and impact on filtering and result sets, providing a comprehensive understanding of sql joins and table aliasing.', 'chapters': [{'end': 630.346, 'start': 474.436, 'title': 'Types of joins in sql', 'summary': 'Discusses the concepts of inner join, left join, right join, and full outer join in sql, highlighting how each join retrieves matching data and the additional data based on specific conditions.', 'duration': 155.91, 'highlights': ['The full outer join retrieves all the data from both tables, including the matching data from the inner join as well as all the data from the left and right tables, resulting in a comprehensive dataset.', 'The right join retrieves all the matching data from the right table and includes all the data from the right table, even if it does not have a match in the left table, providing a complete view of the data from the right table.', 'The left join retrieves all the matching data from the left table and includes all the data from the left table, even if it does not have a match in the right table, ensuring that all data from the left table is included in the result set.', 'The inner join retrieves only the data that has a matching condition in both tables, showcasing the common data shared between the tables and excluding any unmatched data.']}, {'end': 1079.686, 'start': 632.017, 'title': 'Sql joins and aliasing', 'summary': 'Covers sql joins and table aliasing, explaining inner join, left join, right join, and full outer join, demonstrating their function and impact on table filtering and result sets.', 'duration': 447.669, 'highlights': ['The chapter covers SQL joins and table aliasing. The chapter provides an in-depth explanation of SQL joins and table aliasing, offering a comprehensive understanding of their usage and benefits.', 'Explains inner join, left join, right join, and full outer join. The explanation includes the functionality and differences between inner join, left join, right join, and full outer join, providing clarity on their distinct purposes and outcomes.', 'Demonstrates the impact of joins on table filtering and result sets. The demonstration showcases how various joins affect table filtering and result sets, allowing for a clear understanding of their implications in query results and data retrieval.', 'Provides insights into the usage of table aliasing. The chapter offers insights into the frequent use and advantages of table aliasing in SQL queries, emphasizing its relevance for efficient and readable code.']}], 'duration': 605.25, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/2HVMiPPuPIM/pics/2HVMiPPuPIM474436.jpg', 'highlights': ['The full outer join retrieves all the data from both tables, including the matching data from the inner join as well as all the data from the left and right tables, resulting in a comprehensive dataset.', 'The chapter covers SQL joins and table aliasing. The chapter provides an in-depth explanation of SQL joins and table aliasing, offering a comprehensive understanding of their usage and benefits.', 'The right join retrieves all the matching data from the right table and includes all the data from the right table, even if it does not have a match in the left table, providing a complete view of the data from the right table.', 'Explains inner join, left join, right join, and full outer join. The explanation includes the functionality and differences between inner join, left join, right join, and full outer join, providing clarity on their distinct purposes and outcomes.', 'The left join retrieves all the matching data from the left table and includes all the data from the left table, even if it does not have a match in the right table, ensuring that all data from the left table is included in the result set.', 'Demonstrates the impact of joins on table filtering and result sets. The demonstration showcases how various joins affect table filtering and result sets, allowing for a clear understanding of their implications in query results and data retrieval.', 'Provides insights into the usage of table aliasing. The chapter offers insights into the frequent use and advantages of table aliasing in SQL queries, emphasizing its relevance for efficient and readable code.', 'The inner join retrieves only the data that has a matching condition in both tables, showcasing the common data shared between the tables and excluding any unmatched data.']}], 'highlights': ['The full outer join retrieves all the data from both tables, including the matching data from the inner join as well as all the data from the left and right tables, resulting in a comprehensive dataset.', 'The chapter covers SQL joins and table aliasing. The chapter provides an in-depth explanation of SQL joins and table aliasing, offering a comprehensive understanding of their usage and benefits.', 'The right join retrieves all the matching data from the right table and includes all the data from the right table, even if it does not have a match in the left table, providing a complete view of the data from the right table.', 'Explains inner join, left join, right join, and full outer join. The explanation includes the functionality and differences between inner join, left join, right join, and full outer join, providing clarity on their distinct purposes and outcomes.', 'The left join retrieves all the matching data from the left table and includes all the data from the left table, even if it does not have a match in the right table, ensuring that all data from the left table is included in the result set.', 'Demonstrates the impact of joins on table filtering and result sets. The demonstration showcases how various joins affect table filtering and result sets, allowing for a clear understanding of their implications in query results and data retrieval.', 'Provides insights into the usage of table aliasing. The chapter offers insights into the frequent use and advantages of table aliasing in SQL queries, emphasizing its relevance for efficient and readable code.', 'The inner join retrieves only the data that has a matching condition in both tables, showcasing the common data shared between the tables and excluding any unmatched data.', 'The left join allows for the retrieval of all matches from the left table and includes non-matching records, resulting in a total of four records in the output.', 'Right join retrieves the intersection of the inner join as well as the non-matching data from the right table, emphasizing the differences in results compared to left join.', 'The inner join results in three records, representing the matching data from both tables, demonstrating the concept of only obtaining the matches in the result set.', 'The left join yields the same three records as the inner join, representing the matching data, along with an additional non-matching record from the left table, exemplifying the inclusion of non-matching records in the result set.', 'The chapter introduces the types of SQL joins, including inner, left, right, and full outer, and provides visual aids such as Venn diagrams and simplified tables to aid in comprehension.', 'The chapter explains the concept of inner join, illustrating through Venn diagrams how it retrieves only the data that is common in both tables, facilitating practical understanding of the concept.', 'The inner join process is explained using specific examples, such as matching city IDs for customers, resulting in a clear understanding of the inner join operation.', 'The detailed explanation of how the inner join retrieves matching records while excluding non-matching ones, demonstrated through the analysis of customer and city data, enhances the understanding of the inner join operation.', "The process of using an inner join in SQL to combine data from two tables is explained, providing a clear example of a query involving a 'customer' table and a 'city' table.", 'The examples of matching and non-matching records, such as Sally Smith living in Kansas City with a city ID of 1 and Mary Smith not having a matching city ID, provide concrete instances of the inner join outcomes.', 'Joey Blue uses Venn diagrams and simplified tables to illustrate the inner join concept, demonstrating how it retrieves data that exists in both tables, enhancing the practical understanding of the inner join operation.']}