1. Learn
  2. /
  3. Courses
  4. /
  5. Joining Data in SQL

Connected

Exercise

Semi join

Great job getting acquainted with semi joins and anti joins! You are now going to practice using semi joins.

Let's say you are interested in identifying languages spoken in the Middle East. The languages table contains information about languages and countries, but it does not tell you what region the countries belong to. You can build up a semi join by filtering the countries table by a particular region, and then using this to further filter the languages table.

You'll build up your semi join as you did in the video exercise, block by block, starting with a selection of countries from the countries table, and then leveraging a WHERE clause to filter the languages table by this selection.

Instructions 1/3

undefined XP
    1
    2
    3
  • Select country code as a single field from the countries table, filtering for countries in the 'Middle East' region.