9 lines
458 B
SQL
9 lines
458 B
SQL
/*18. Write a query in SQL to list first and last name of all the directors with number of genres movies they directed with
|
|
genres name, and arranged the result alphabetically with the first and last name of the director.*/
|
|
SELECT dir_fname,dir_lname, gen_title,count(gen_title)
|
|
FROM director
|
|
NATURAL JOIN movie_direction
|
|
NATURAL JOIN movie_genres
|
|
NATURAL JOIN genres
|
|
GROUP BY dir_fname, dir_lname,gen_title
|
|
ORDER BY dir_fname,dir_lname; |