# Joining Data in SQL

4.5+

89 reviewsBeginner

Level up your SQL knowledge and learn to join tables together, apply relational set theory, and work with subqueries.

Start Course for Free4 Hours14 Videos47 Exercises41,179 Learners3950 XPData Analyst in SQL TrackData Engineer TrackData Scientist Professional with Python TrackData Scientist Professional with R TrackSQL Fundamentals Track

## 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

Joining data is an essential skill which enables us to draw information from separate tables together into a single, meaningful set of results. Learn to supercharge your queries using table joins and relational set theory in this course on joining data.

In this course, you’ll learn how to:

✓ Work with more than one table in SQL

✓ Use inner joins, outer joins and cross joins

✓ Leverage set theory, including unions, intersect, and except clauses

✓ Create nested queries

Every step is accompanied by exercises and opportunities to apply the theory and grow your confidence in SQL.

In this course, you’ll learn how to:

✓ Work with more than one table in SQL

✓ Use inner joins, outer joins and cross joins

✓ Leverage set theory, including unions, intersect, and except clauses

✓ Create nested queries

Every step is accompanied by exercises and opportunities to apply the theory and grow your confidence in SQL.

- 1
### Introducing Inner Joins

**Free**In this chapter, you’ll be introduced to the concept of joining tables and will explore all the ways you can enrich your queries using joins—beginning with inner joins.

- 2
### Outer Joins, Cross Joins and Self Joins

After familiarizing yourself with inner joins, you will come to grips with different kinds of outer joins. Next, you will learn about cross joins. Finally, you will learn about situations in which you might join a table with itself.

LEFT and RIGHT JOINs50 xpRemembering what is LEFT100 xpThis is a LEFT JOIN, right?100 xpBuilding on your LEFT JOIN100 xpIs this RIGHT?100 xpFULL JOINs50 xpComparing joins100 xpChaining FULL JOINs100 xpCrossing into CROSS JOIN50 xpHistories and languages100 xpChoosing your join100 xpSelf joins50 xpComparing a country to itself100 xpAll joins on deck100 xp - 3
### Set Theory for SQL Joins

In this chapter, you will learn about using set theory operations in SQL, with an introduction to UNION, UNION ALL, INTERSECT, and EXCEPT clauses. You’ll explore the predominant ways in which set theory operations differ from join operations.

- 4
### Subqueries

In this closing chapter, you’ll begin by investigating semi-joins and anti-joins. Next, you'll learn how to use nested queries. Last but not least, you’ll wrap up the course with some challenges!

Subquerying with semi joins and anti joins50 xpMultiple WHERE clauses100 xpSemi join100 xpDiagnosing problems using anti join100 xpSubqueries inside WHERE and SELECT50 xpSubquery inside WHERE100 xpWHERE do people live?100 xpSubquery inside SELECT100 xpSubqueries inside FROM50 xpSubquery inside FROM100 xpSubquery challenge100 xpFinal challenge100 xpThe finish line50 xp

In the following tracks

Data Analyst in SQLData EngineerData Scientist Professional with PythonData Scientist Professional with RSQL FundamentalsCollaborators

Prerequisites

Intermediate SQL#### Maham Khan

Senior Data Science Content Developer at DataCamp

Hi, I am a Data Scientist and Senior Content Developer at DataCamp, on a mission to make data skills accessible for everyone. Most recently, I've worked on creating toolkits and exploring experimental applications of data science for urban analytics, disaster risk management and climate change mitigation, at the World Bank. I have a background in Experimental Psychology and Philosophy from the University of Oxford, and Urban Data Science from NYU.

## Don’t just take our word for it

*4.5from 89 reviews

71%

13%

11%

4%

0%

Sort by

- Sergio P.6 days
An excellent course outlining principles of joining relational data with SQL.

- Yemataw A.11 days
Good

- Ma. C.12 days
It is great, as usual. It's just that somehow, making queries inside sub-queries can be somewhat confusing, but I guess that's where the practice sets come handy, so we can always practice and be more consistent with our results. Thank you.

- Zilong M.16 days
It is good that it let me learn and practice the joining syntaxes!

- Andrzej R.17 days
as all courses I've done with Datacamp, this one is very practical, with hands on keyboard...

Loading ...

"An excellent course outlining principles of joining relational data with SQL."

Sergio P.

"Good"

Yemataw A.

"It is great, as usual. It's just that somehow, making queries inside sub-queries can be somewhat confusing, but I guess that's where the practice sets come handy, so we can always practice and be more consistent with our results. Thank you."

Ma. C.

## Join over 11 million learners and start Joining Data in SQL 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.