Here\'s my code:
select yr,count(*) from movie join casting on casting.movieid=movie.id join actor on casting.actorid = actor.id where actor.name = \'Jo
create view sal as select yr,count(*) as ct from (select title,yr from movie m, actor a, casting c where a.name='JOHN' and a.id=c.actorid and c.movieid=m.id)group by yr
-----VIEW CREATED-----
select yr from sal where ct =(select max(ct) from sal)
YR 2013