CSE 190 M, Spring 2007
Final Exam Key

1. HTML/CSS


2. Javascript/DOM


3. Ajax/XML


4. PHP


5. SQL

SELECT DISTINCT c1.Role
FROM     Movie m1, Movie m2, Cast c1, Cast c2
WHERE    c1.Role = c2.Role
AND      c1.mid = m1.id
AND      c2.mid = m2.id
AND      m1.name LIKE "%Pirates of the Caribbean%"
AND      m2.name LIKE "%Pirates of the Caribbean%"
ORDER BY c1.Role;

or:

SELECT DISTINCT c1.Role
FROM     Movie m1, Movie m2, Cast c1, Cast c2
WHERE    c1.aid = c2.aid
AND      c1.mid = m1.id
AND      c2.mid = m2.id
AND      m1.name LIKE "%Pirates of the Caribbean%"
AND      m2.name LIKE "%Pirates of the Caribbean%"
ORDER BY c1.Role;