Untitled


SUBMITTED BY: Guest

DATE: Nov. 13, 2013, 10:29 a.m.

FORMAT: Text only

SIZE: 750 Bytes

HITS: 884

  1. Actsin table Stars table Movies table
  2. Starid Movienum Starid Gname Fname Movienum Title Yearreleased
  3. 100 1000 100 Matt Damon 1000 God 2002
  4. select top 1 m.title, m.yearreleased
  5. from movies m join
  6. actsin ai
  7. on ai.movienum = m.movienum join
  8. stars s
  9. on ai.starid = s.starid
  10. where gname = 'Matt' and fname = 'Damon'
  11. order by m.yearreleased desc;
  12. select m.title, m.yearreleased
  13. from movies m join
  14. actsin ai
  15. on ai.movienum = m.movienum join
  16. stars s
  17. on ai.starid = s.starid
  18. where gname = 'Matt' and fname = 'Damon'
  19. order by m.yearreleased desc
  20. limit 1;

comments powered by Disqus