There's a table titled "movies". The table can be found here. (Please scroll down to the bottom of the page to see the table).
I want to find the list of first movies directed by each director in the list.
I've written the following query
SELECT director, title AS first_movie, MIN(year) AS year FROM movies GROUP BY director;
I did get the desired results but I'm wondering if there's any better way to do this.
Same way I want to find the list of second movies directed by all the directors in the list. How do i do it?
And finally, is there a general way to arrive at the list of nth movie directed by all the directors in the list?