Created
August 31, 2012 11:15
-
-
Save gideondsouza/3551570 to your computer and use it in GitHub Desktop.
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 yr,COUNT(title) FROM | |
movie JOIN casting ON movie.id=movieid | |
JOIN actor ON actorid=actor.id | |
WHERE name='John Travolta' | |
GROUP BY yr | |
HAVING COUNT(title)=(SELECT MAX(c) FROM | |
(SELECT yr,COUNT(title) AS c FROM | |
movie JOIN casting ON movie.id=movieid | |
JOIN actor ON actorid=actor.id | |
WHERE name='John Travolta' | |
GROUP BY yr) AS t | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment