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.
This exercise is part of the course
Joining Data in SQL
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
-- Select country code for countries in the Middle East
___