MEDIUMVerified Real Interview• Content Analytics Lead

Movie Duration 90th Percentile

Netflix wants to evaluate content pacing across genres. For each genre that has at least 3 movies, calculate the 90th percentile duration (in minutes).

Write a query to output:

  • genre
  • p90_duration (rounded to nearest integer)

Order by p90_duration descending.

Table:

  • movies (movie_id INT, title VARCHAR, genre VARCHAR, duration_minutes INT)

Execution Sandbox:

Your query executes inside an isolated in-memory PostgreSQL engine (PGlite WebAssembly). You have full access to standard PostgreSQL aggregations, window functions, and CTEs.

Standard SQL (ANSI)|Ln 1, Col 1
⌘↵ Run Query
Ready to execute. Press Run (⌘+Enter)
Write your query and click “Run” or press ⌘+Enter to inspect output.