Skip to main content
HomeSQLJoining Data in SQL

Joining Data in SQL

4.3+
266 reviews
Beginner

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

Start Course for Free
4 hours14 videos47 exercises173,214 learnersTrophyStatement of Accomplishment

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.
Group

Training 2 or more people?

Try DataCamp for Business

Loved by learners at thousands of companies


Course Description

Joining data is an essential skill in data analysis, enabling you to draw information from separate tables together into a single, meaningful set of results. In this comprehensive course on joining data, you'll delve into the intricacies of table joins and relational set theory, learning how to optimize your queries for efficient data retrieval.

Understand Data Joining Fundamentals

You will learn how to work with multiple tables in SQL by navigating and extracting data from various tables within a SQL database using various join types, including inner joins, outer joins, and cross joins. With practice, you'll gain the knowledge of how to select the appropriate join method.

Explore Advanced Data Manipulation Techniques

Next up, you'll explore set theory principles such as unions, intersects, and except clauses, as well as discover the power of nested queries in SQL. Every step is accompanied by exercises and opportunities to apply the theory and grow your confidence in SQL.
For Business

GroupTraining 2 or more people?

Get your team access to the full DataCamp library, with centralized reporting, assignments, projects and more
Try DataCamp for BusinessFor a bespoke solution book a demo.

In the following Tracks

Certification Available

SQL Fundamentals

Go To Track
Certification Available

Data Scientist in Python

Go To Track
Certification Available

Data Scientist in R

Go To Track
  1. 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.

    Play Chapter Now
    The ins and outs of INNER JOIN
    50 xp
    Your first join
    100 xp
    Joining with aliased tables
    100 xp
    USING in action
    100 xp
    Defining relationships
    50 xp
    Relationships in our database
    100 xp
    Inspecting a relationship
    100 xp
    Multiple joins
    50 xp
    Joining multiple tables
    100 xp
    Checking multi-table joins
    100 xp
  2. 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.

    Play Chapter Now
  3. 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.

    Play Chapter Now
For Business

GroupTraining 2 or more people?

Get your team access to the full DataCamp library, with centralized reporting, assignments, projects and more

In the following Tracks

Certification Available

SQL Fundamentals

Go To Track
Certification Available

Data Scientist in Python

Go To Track
Certification Available

Data Scientist in R

Go To Track

In other tracks

Associate Data Analyst in SQLAssociate Data Engineer in SQLSQL Server Fundamentals

datasets

CountriesLeadersDiagrams

collaborators

Collaborator's avatar
Amy Peterson
Collaborator's avatar
James Chapman
Collaborator's avatar
Izzy Weber

prerequisites

Intermediate SQL
Maham Khan HeadshotMaham Khan

Senior Data Scientist, YouView TV

Maham is a Data Scientist on a mission to make data skills accessible for everyone. She's 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. She has a background in Experimental Psychology and Philosophy from the University of Oxford and Urban Data Science from NYU.
See More

Don’t just take our word for it

*4.3
from 266 reviews
67%
14%
14%
4%
2%
Sort by
  • Abhishek B.
    1 day

    Loved the experience of learning...

  • Camilo R.
    2 days

    I'm still learning

  • Rishabh B.
    6 days

    excellent

  • Olufemi O.
    7 days

    At first, it was challenging. But with more practice, I got a hang on it. I discovered how powerful the tool is in simplifying a complex task

  • Nurbolot Z.
    9 days

    Great insightful module!

"Loved the experience of learning..."

Abhishek B.

"I'm still learning"

Camilo R.

"excellent"

Rishabh B.

FAQs

Join over 14 million learners and start Joining Data in SQL today!

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.