Created
October 24, 2013 20:37
-
-
Save bagvendt/7144563 to your computer and use it in GitHub Desktop.
Top 2 rated movies for actor_id = ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT actor_id, first_name, last_name, name FROM actors | |
JOIN `roles` | |
ON actors.`id` = roles.`actor_id` | |
JOIN `movies` | |
ON movies.`id` = `movie_id` | |
WHERE rank IS NOT NULL AND actor_id = %s | |
ORDER BY rank DESC | |
limit 2; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment