Actsin table Stars table Movies table
Starid Movienum Starid Gname Fname Movienum Title Yearreleased
100 1000 100 Matt Damon 1000 God 2002
select top 1 m.title, m.yearreleased
from movies m join
actsin ai
on ai.movienum = m.movienum join
stars s
on ai.starid = s.starid
where gname = 'Matt' and fname = 'Damon'
order by m.yearreleased desc;
select m.title, m.yearreleased
from movies m join
actsin ai
on ai.movienum = m.movienum join
stars s
on ai.starid = s.starid
where gname = 'Matt' and fname = 'Damon'
order by m.yearreleased desc
limit 1;