SQL for Joining Data
Join two or three tables together into one, combine tables using set theory, and work with subqueries in PostgreSQL.
Start Course for Free5 Hours13 Videos53 Exercises
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.Loved by learners at thousands of companies
Course Description
Now that you've learned the basics of SQL, it's time to supercharge your queries using joins and relational set theory. In this course, you'll learn all about the power of joining tables while exploring interesting features of countries and their cities throughout the world. You will master inner and outer joins, as well as self joins, semi joins, anti joins and cross joins—fundamental tools in any PostgreSQL wizard's toolbox. Never fear set theory again after learning all about unions, intersections, and except clauses through easy-to-understand diagrams and examples. Lastly, you'll be introduced to the challenging topic of subqueries. You will be able to visually grasp these ideas by using Venn diagrams and other linking illustrations.
- 1
Introduction to joins
FreeIn this chapter, you'll be introduced to the concept of joining tables, and will explore the different ways you can enrich your queries using inner joins and self joins. You'll also see how to use the case statement to split up a field into different categories.
- 2
Outer joins and cross joins
In this chapter, you'll come to grips with different kinds of outer joins. You'll learn how to gain further insights into your data through left joins, right joins, and full joins. In addition to outer joins, you'll also work with cross joins.
- 3
Set theory clauses
In this chapter, you'll learn more about set theory using Venn diagrams and get an introduction to union, union all, intersect, and except clauses. You'll finish by investigating semi joins and anti joins, which provide a nice introduction to subqueries.
State of the UNION50 xpUnion100 xpUnion (2)100 xpUnion all100 xpINTERSECTional data science50 xpIntersect100 xpIntersect (2)100 xpReview union and intersect50 xpEXCEPTional50 xpExcept100 xpExcept (2)100 xpSemi-joins and Anti-joins50 xpSemi-join100 xpRelating semi-join to a tweaked inner join50 xpDiagnosing problems using anti-join100 xpSet theory challenge100 xp - 4
Subqueries
In this closing chapter, you'll learn how to use nested queries and you'll use what you’ve learned in this course to solve three challenge problems.
Subqueries inside WHERE and SELECT clauses50 xpSubquery inside where100 xpSubquery inside where (2)100 xpSubquery inside select100 xpSubquery inside FROM clause50 xpSubquery inside from100 xpAdvanced subquery100 xpSubquery challenge100 xpSubquery review50 xpCourse review50 xpFinal challenge100 xpFinal challenge (2)100 xpFinal challenge (3)100 xp
Collaborators


Prerequisites
Intermediate SQL QueriesDr. Chester Ismay
See MoreEducator, Data Scientist, and R/Python Consultant
Chester enjoys helping others get into data science, figuring out how to best practice and improve on their skills, and working as a part-time consultant on R and Python programming projects. He is co-author of "Statistical Inference via Data Science: A ModernDive into R and the Tidyverse" available at moderndive.com and for purchase from CRC Press. He likes leading education and data science teams with the goal of improving best practices based on data from the learning sciences.
Don’t just take our word for it
*4.6
71%
24%
3%
1%
1%
Sort by
- Nadeem A.26 days
The course is very well prepared. One can become well versed in applying the concept after the course. I personally felt that some more questions could have been better.
- Mariagrazia B.28 days
Interesting and fun ! Narrow on the title topic, great in supporting the user with theory and exercises.
- Kristóf É.about 2 months
*
- Ganbalt C.2 months
It was amazing course.
- David P.2 months
Really clear and useful. I loved it!
FAQs
Join over 12 million learners and start SQL for Joining Data today!
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.