Comparing two set operations
You learned in the video exercise that UNION ALL
returns duplicates, whereas UNION
does not. In this exercise, you will dive deeper into this, looking at cases for when UNION
is appropriate compared to UNION ALL
.
You will be looking at combinations of country code and year from the economies
and populations
tables.
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.
-- Query that determines all pairs of code and year from economies and populations, without duplicates
___