Click here to navigate the course.

Drag the edges to resize the window.

In Projects, you can keep track of your progress as you go throught the tasks. Check each item as you complete it!

Query Results

Run a query to see results.

Database Schema

Schema undefined.
Code Editor
Learn

Great job! What if we wanted to allow duplicate values? We can do this by using the ALL keyword with UNION, with the following syntax:

SELECT column_name(s) FROM table1 UNION ALL SELECT column_name(s) FROM table2;

In our ecommerce store, if we learned that we had records from historic order items in an additional table, we could use the following query to combine the tables for a complete analysis of sale price:

SELECT id, sale_price FROM order_items UNION ALL SELECT id, sale_price FROM order_items_historic;

Then we can perform an analysis on top of the combined result set, like finding the total count of order items.

SELECT count(*) FROM ( SELECT id, sale_price FROM order_items UNION ALL SELECT id, sale_price FROM order_items_historic) as a;
Report a Bug
If you see a bug or any other issue with this page, please report it here.