Skip to content

Instantly share code, notes, and snippets.

@Miista
Created March 15, 2014 16:32
Show Gist options
  • Save Miista/9570056 to your computer and use it in GitHub Desktop.
Save Miista/9570056 to your computer and use it in GitHub Desktop.
CREATE TABLE cast_info AS
SELECT DISTINCT ci.movie_id, ci.person_id, cn.name AS char_name, rt.role, ci.note, ci.nr_order
FROM imdb.ex x, imdb.cast_info ci, imdb.role_type rt, imdb.char_name cn
WHERE x.id = ci.movie_id
AND ci.role_id = rt.id
AND ci.person_role = cn.id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment