Skip to content
Joining Data in SQL
  • AI Chat
  • Code
  • Report
  • 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).


    Note: When using sample integrations such as those that contain course data, you have read-only access. You can run queries, but cannot make any changes such as adding, deleting, or modifying the data (e.g., creating tables, views, etc.).

    Take Notes

    Add notes about the concepts you've learned and SQL cells with queries you want to keep.

    Add your notes here

    Unknown integration
    DataFrameavailable as
    df1
    variable
    SELECT *
    FROM public.books
    WHERE year BETWEEN 2015 AND 2019
    
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.
    Unknown integration
    DataFrameavailable as
    df2
    variable
    SELECT *
    FROM public.books
    WHERE year IN (2009, 2012, 2014)
    
    
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.
    Unknown integration
    DataFrameavailable as
    world_info
    variable
    -- Add your own queries here
    SELECT name AS country, code, region, basic_unit
    FROM world.countries
    FULL JOIN world.currencies
    USING (code)
    WHERE region = 'North America' OR name IS NULL
    ORDER BY region
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.
    Unknown integration
    DataFrameavailable as
    df
    variable
    -- Select the 10 most popular colors from all parts
    SELECT colors.name, COUNT(*)
    FROM inventory_parts
    	INNER JOIN colors
        	ON inventory_parts.color_id = colors.id
    GROUP BY colors.name
    ORDER BY COUNT(*) DESC
    LIMIT 10
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.
    Unknown integration
    DataFrameavailable as
    df3
    variable
    SELECT *
    FROM dvdrentals.rental
    LIMIT 3
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.
    Unknown integration
    DataFrameavailable as
    df4
    variable
    SELECT *
    FROM dvdrentals.customer LIMIT 5
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.
    Unknown integration
    DataFrameavailable as
    df5
    variable
    SELECT * FROM dvdrentals.inventory LIMIT 5
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.
    Unknown integration
    DataFrameavailable as
    df6
    variable
    SELECT * FROM dvdrentals.film LIMIT 5
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.
    Unknown integration
    DataFrameavailable as
    language
    variable
    SELECT * FROM dvdrentals.language
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.