LXLogicExcel
๐Ÿ”ฅ
0
โญ
0
UNION - Combining Query Results1 / 10
The UNION operator combines the results of multiple queries and removes duplicates. Try:

SELECT title FROM action_movies UNION SELECT title FROM scifi_movies;

Notice which rows belong to both tables, and whether they appear as duplicates in the result (hint: they don't).
movie_idtitlerelease_yearbox_office_millions
1The Dark Knight20081005
2Gladiator2000460
3The Bourne Ultimatum2007444
4Casino Royale2006616
5Avatar20092923
6Iron Man2008585
movie_idtitlerelease_yearbox_office_millions
1Avatar20092923
2Inception2010836
3The Matrix Reloaded2003741
4War of the Worlds2005603
5Minority Report2002358
6Iron Man2008585

Ctrl+Enter to submit

๐Ÿ”ฅ 0 streak
โญ 0 XP this lesson
All Lessons

UNION - Combining Query Results - Free SQL Practice Online

Practise UNION - Combining Query Results with 10 free, interactive SQL exercises. You type real queries into your browser and get instant feedback on every answer - no database setup, no install, and no signup. It is a fast, hands-on way to learn SQL online and build query skills you can use at work.