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.).
Explore Datasets
Use the descriptions, films, people, reviews, and roles tables to explore the data and practice your skills!
- Which titles in the
reviewstable have an IMDB score higher than 8.5? - Select all titles from Germany released after 2010 from the
filmstable. - Calculate a count of all movies by country using the
filmstable.
Start of Notes
-> COUNT() counts the number of recors with a value in a field
-> COUNT(field_name) counts values in a field
-> COUNT(*) counts recors in a table
-> DISTINCT removes duplicates to return only unique values
-> COUNT() with DISTINCT count the unique values
Question 1
Count the number of records in the people table, aliasing the result as count_records.
SELECT COUNT(language) AS count_languages, COUNT(country) AS count_countries
FROM films;-- Query the right table in information_schema
SELECT table_name
FROM films_schema.___
-- Specify the correct table_schema value
WHERE table_schema = 'films';