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.
Take Notes
Add notes about the concepts you've learned and SQL cells with queries you want to keep.
In this Datasets I have use multiple tables to explore the datasets and genrate some insights.
DataFrameas
df
variable
-- Add your own queries here
SELECT *
FROM cinema.FILMS
LIMIT 5Explore 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.
DataFrameas
df
variable
select f.title,max(r.imdb_score) AS IMDB from cinema.films as f
inner Join
cinema.reviews as r on
f.id=r.id
GROUP BY f.title
ORDER BY IMDB DESC
LIMIT 1;
DataFrameas
df1
variable
Select title from cinema.films
where release_year>2010 and country='Germany';DataFrameas
df2
variable
Select country, count(id) as MovieCount from cinema.films
group by country
order by moviecount desc
limit 10;DataFrameas
films
variable
SELECT * FROM cinema.films