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: Solutions : SELECT movie_title , movie_year , CONCAT ( TRIM ( director_first_name ), TRIM ( director_last_name )) as director_name , CONCAT ( TRIM ( actor_first_name ), TRIM ( actor_last_name )) as actor_name , role FROM movies NATURAL JOIN movies_directors NATURA...
select movie_title,
ReplyDeletemovie_year,
concat (director_first_name, director_last_name)director_name,
concat(actor_first_name, actor_last_name)actors_name,
role
from directors d
right join movies_directors md
on d.director_id=md.director_id
right join movies m
on m.movie_id=md.movie_id
right join movies_cast mc
on mc.movie_id=m.movie_id
right join actors a
on a.actor_id=mc.actor_id
order by m.movie_time asc
limit 1
;