Skip to content
Intermediate SQL
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
DataFrameavailable as
df
variable
-- Add your own queries here
SELECT *
FROM cinema.reviews
LIMIT 5
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.
DataFrameavailable as
df1
variable
---COUNT DISTINCT REF
SELECT COUNT(DISTINCT column)
FROM table
DataFrameavailable as
df3
variable
SELECT name
FROM people
WHERE name LIKE 'Ade%';
---% matches zero, one, or many characters.
--- This would return 'Adel Karam', 'Adelaide Kane', or 'Aden Young'
DataFrameavailable as
df5
variable
---FILTERING TEXT---
SELECT name
FROM people
WHERE name LIKE 'Ev_'
--- _ will match a single character.
---This query would return something like Eve
SELECT name
FROM people
WHERE name NOT LIKE 'A.%'
--- Basically saying that anything starting with A. would be excluded
SELECT name
FROM people
WHERE name Like '%r'
---Would return names that ended in 'r'
SELECT name
FROM people
WHERE name LIKE '__t%'
--- Would return anyone whose name had 't' as the third character