Skip to content

Latest commit

 

History

History
75 lines (37 loc) · 2.61 KB

README.md

File metadata and controls

75 lines (37 loc) · 2.61 KB

Import cyf_mflix_movies_popular.json to your sample_mflix db:

  • In compass, select the sample_mflix db
  • Click '+' to create a new collection. Call it movies_popular (that way you still have the full movies collection)
  • Menu bar: Collection -> Import Data
  • Select cyf_mflix_movies_popular.json and import

Run queries in compass to find the following answers

Recap of week 1

  1. Which 3 movies came out in 1978

  2. Which 3 movies rated as PG came out in 2001

  3. Which 4 movies with a metacritic score higher than 90 came out before 1950

  4. Which 3 movies with a metacritic score higher than 90 came out in the 1990s

Deepening week 1

  1. Which 3 movies from Iran have a metacritic score higher than 80

  2. Which 4 movies from one of the Nordic Countries (Sweden, Norway, Finland, Iceland or Denmark) came out in 2011

New functionality

  1. Which 2 movies have included both Matt Damon and Julia Stiles in the cast

  2. Which movie has won 210 awards?

  3. Which movie has more than 50 "rotten" reviews on rotten tomatoes, but was nominated for two Oscars

  4. What are the 3 oldest movies in the database?

  5. Which are the top 3 movies according to the number of "fresh" reviews on rotten tomatoes?

More tricky (read the documentation and figure out how to do it)

  1. What happens if I try to find the 5 movies with the lowest number of "fresh" reviews on rotten tomatoes? How can I work around that

Write express endpoints that compute and returns the answers to the following questions:

Writing simple endpoints

  1. What movies include a given actor in their cast? e.g. /filmsbyactor?actors=Tom%20Cruise

  2. What movies came out in a given year (e.g. /filmsbyyear?year=1999)

  3. What movies have a metacritic score in a range (e.g. /filmsbyscore?minscore=60&maxscore=80)

Building a search object

  1. What movies include any of the given actors (e.g. /filmsbyactor?actors=Tom%Cruise,Matt&20Damon)

  2. Write a search endpoint that optionally combines the simple endpoints (e.g. /film/search?actors=Tom%20Cruise&minscore=80 and /film/search?year=2005&maxscore=75)

More tricky

  1. What are the different kinds of "rated" categories that exist

  2. Return the titles of the movies with the top 5 metacritic scores for a given "rated" category

  3. How many movies have each of the different "rated" categories

  4. What are the worst 5 movies by ratio of fresh to rotten reviews on rotten tomatoes, and that have at least 20 fresh and rotten reviews combined

  5. Write a paginated endpoint to see all movies

  6. Write an endpoint that allows searching for keywords (a single keyword) in descriptions (and/or titles)