Skip to main content

Joining Data in SQL

177 reviews

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 Exercises
93,912 LearnersTrophyStatement of Accomplishment

Create Your Free Account



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.
  1. 1

    Introducing Inner Joins


    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

In the following tracks

Data Analyst in SQLData EngineerData Scientist Professional with PythonData Scientist Professional with RSQL FundamentalsSQL Server Fundamentals


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


Intermediate SQL
Maham Khan HeadshotMaham 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.
See More

Don’t just take our word for it

from 177 reviews
Sort by
  • Madhur J.
    3 days

    Probably the best decision that i could have made.

  • Muhammed K.
    6 days

    By far the best organized course in my opinion, and I have done many on DC. This refers both to video lessons and exercises. 1. Video lessons have graphs that further help visualize relationships and concepts that the lesson is talking about. The material gets abstract quickly, with new functions and syntax, and it is much much easier to comprehend everything when it is displayed not only trough the code itself, but also with simple colorful diagrams. I had no trouble following the lessons one after other, and it felt like I am really grasping the explanations without the need to come back to it as often. 2. Exercises were progressive and pushed me to recall the logic behind my code, not only to recall the syntax. Exercises in many other courses demand only filling in the key words. While I find this useful to get the syntax the first time, it gets repetitive and shallow - and these exercises can be done mindlessly, almost mechanically. Exercises from this course I didn't found that way, they made me reinforce my knowledge gradually.

  • Patricio B.
    13 days

    Amazing. Great job.

  • Priscilla C.
    16 days

    Practical and real exercises, exactly what I needed. Also quick and challenging! Perfect

  • Alexandr I.
    19 days

    I significantly improved my skills in SQL with this course. Thank you!

"Probably the best decision that i could have made."

Madhur J.

"Amazing. Great job."

Patricio B.

"Practical and real exercises, exactly what I needed. Also quick and challenging! Perfect"

Priscilla C.


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

Create Your Free Account



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