Skip to content

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.).

INTERMEDIATE SQL- Aggregate fxns-adds fields vertically

ROUND function in SQL

SELECT ROUND(AVG(facebook_likes), 1) AS avg_facebook_likes -Gives the average of facebook likes to one decimal place. SELECT ROUND(AVG(budget), -3) AS avg_budget_thousands -Rounds the values to the nearest thousands-negative paramenter. very useful when making financial calculations to get a top level view or specify to the penny of cent. Arithmetic -adds records horizontally:useful when a table is missing a metric you want to review +,*,/,- Order of Execution in SQL step 1: FROM step 2: WHERE step 3: SELECT(aliases are difined here) step 4: LIMIT

JOINING DATA IN SQL

Spinner
DataFrameas
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.