The <code>UNION</code> operator <b>combines</b> the results of multiple queries and <b>removes duplicates</b>. Try:<br/><br/>
| movie_id | title | release_year | box_office_millions |
|---|---|---|---|
| 1 | The Dark Knight | 2008 | 1005 |
| 2 | Gladiator | 2000 | 460 |
| 3 | The Bourne Ultimatum | 2007 | 444 |
| 4 | Casino Royale | 2006 | 616 |
| 5 | Avatar | 2009 | 2923 |
| 6 | Iron Man | 2008 | 585 |
| movie_id | title | release_year | box_office_millions |
|---|---|---|---|
| 1 | Avatar | 2009 | 2923 |
| 2 | Inception | 2010 | 836 |
| 3 | The Matrix Reloaded | 2003 | 741 |
| 4 | War of the Worlds | 2005 | 603 |
| 5 | Minority Report | 2002 | 358 |
| 6 | Iron Man | 2008 | 585 |
UNION - Combining Query Results - SQL Practice Online
Practise UNION - Combining Query Results with 10 interactive SQL exercises. You type real queries into your browser and get instant feedback on every answer - no database setup and no install. It is a fast, hands-on way to learn SQL online and build query skills you can use at work.