Short Films

Write a SQL Query to find those lowest duration movies along with the year, director’s name(first and last name combined), actor’s name(first and last name combined) and his/her role in that production.

Output Schema:

movie_title,movie_year,director_name,actor_name,role

NOTE:

  • Output column name has to match the given output schema.
  • Any name is the concatenation(without any delimiter) of first and last name if present
  • (E.g. if director_first_name is ‘Alfred’ and director_last_name is ‘Hitchcock’ then director_name is ‘AlfredHitchcock’)

Example Output:

movie_title,movie_year,director_name,actor_name,role
Vertigo,1958,AlfredHitchcock,JamesStewart,JohnFerguson

Schema Design:

Schema Description

NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details.
Hints
  • Hints are not available for this problem

Discussion


Loading...
Click here to start solving coding interview questions