programming-examples/sql/SQLMovieDatabase/24. Write a query in SQL to find those lowest duration movies along with the year, director's name, actor's name and his or her role in that production.sql

10 lines
419 B
MySQL
Raw Normal View History

2019-11-18 14:05:53 +01:00
/*24. Write a query in SQL to find those lowest duration movies along with the year, director's name, actor's name and his/her
role in that production.*/
SELECT mov_title, mov_year, dir_fname, dir_lname,
act_fname, act_lname, role
FROM movie
NATURAL JOIN movie_direction
NATURAL JOIN movie_cast
NATURAL JOIN director
NATURAL JOIN actor
WHERE mov_time=(SELECT MIN(mov_time) FROM movie);