Joining Data with SQL
Here you can access every table used in the course. To access each table, you will need to specify the world
schema in your queries (e.g., world.countries
for the countries
table, and world.languages
for the languages
table).
Take Notes
Add notes about the concepts you've learned and SQL cells with queries you want to keep.
OUTER JOIN *____>LEFT JOIN→ Will return all on left and table and those on right that only match with those on right table.
SELECT column FROM table_name_left LEFT JOIN table_name_right USING(field_to_match_with);
Fields that don’t have any relations with the field on right will show NULL in the output
*____>RIGHT JOIN→Will return all the values on right and NULL for left table
SELECT column FROM left_table RIGHT JOIN right_table ON left_table.id=right_table.id;
//can be written as RIGHT OUTER JOIN
//RIGHT JOIN isn’t used as much cause RIGHT JOIN can be made using the left JOIN.
Add your notes here
-- Add your own queries here
SELECT *
FROM world.languages
LIMIT 5