DataDriven
LearnPracticeInterviewDiscussDailyJobs

The Genre Filter

A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
medium
Seniority
L4

Problem

Given movies (list of dicts with movie_id, genre, rating, box_office), actors (list of dicts with actor_id, name), mapping (list of dicts with actor_id and movie_id), a target genre, and a min_rating, return a dict mapping each actor's name to their total box_office summed across movies whose genre matches AND rating >= min_rating. Include only actors with at least one qualifying movie.

Summary

Three tables, two conditions, one actor's total.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.

Related

  • All Practice Problems
  • Mock Interview Mode
  • Python Interview Questions
  • Data Engineering Interview Prep Guide
  • Daily Challenge
  • Data Engineering Lessons