Skip to content
Intermediate SQL
  • AI Chat
  • Code
  • Report
  • Spinner

    Intermediate SQL

    Here you can access every table used in the course. To access each table, you will need to specify the cinema schema in your queries (e.g., cinema.reviews for the reviews 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
    df
    variable
    -- Add your own queries here
    SELECT *
    FROM cinema.reviews
    LIMIT 5
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.

    Explore Datasets

    Use the descriptions, films, people, reviews, and roles tables to explore the data and practice your skills!

    • Which titles in the reviews table have an IMDB score higher than 8.5?
    • Select all titles from Germany released after 2010 from the films table.
    • Calculate a count of all movies by country using the films table.
    SELECT COUNT(film_id) AS count_film_id
    FROM reviews;
    

    Te permite contar asi la cantidad de filas que hay en una columna. Es imp el SELECT COUNT

    SELECT COUNT(birthdate) AS count_birthdate
    FROM people;

    TE cuento las filas que tienen una bithdate. Si en vez de birthdate, pongo * cuenta todas las filas de esa tabla. El resultado lo pone como una cuenta de numeros.

    SELECT COUNT(language) AS count_languages, COUNT(country) AS count_countries
    FROM films;
    Unknown integration
    DataFrameavailable as
    df1
    variable
    count_languages	count_countries
    4957	4966
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.

    Si queres contar dos cosas en una sola vez.

    SELECT COUNT(DISTINCT language) AS count_distinct_languages
    FROM films;
    Unknown integration
    DataFrameavailable as
    df2
    variable
    count_distinct_languages
    47
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.

    Te cuenta solo los diferentes.