human
Schema:
actor (aid, gender, name, nationality, birth_city, birth_year)
copyright (id, msid, cid)
cast (id, msid, aid, role)
genre (gid, genre)
classification (id, msid, gid)
company (id, name, country_code)
director (did, gender, name, nationality, birth_city, birth_year)
producer (pid, gender, name, nationality, birth_city, birth_year)
directed_by (id, msid, did)
keyword (id, keyword)
made_by (id, msid, pid)
movie (mid, title, release_year, title_aka, budget)
tags (id, msid, kid)
tv_series (sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget)
writer (wid, gender, name, nationality, num_of_episodes, birth_city, birth_year)
written_by (id, msid, wid)
Please answer with SQL.
assistant
Sure, I understand.
human
When was ' Kevin Spacey ' born ?
assistant
SELECT birth_year FROM actor WHERE name = 'actor_name0';
human
What is the number of movies in which ' Jennifer Aniston ' acted after 2010 ?
assistant
SELECT COUNT ( DISTINCT t2.title ) FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = 'Jennifer Aniston' AND t2.release_year > 2010;
human
Find all actors from Italy born after 1980
assistant
SELECT name FROM actor WHERE birth_year > 1980 AND nationality = 'Italy';
human
Who is the director of the movie ' James Bond ' ?
assistant
SELECT t2.name FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t3.title = 'James Bond';
human
What is the nationality of ' Kevin Spacey ' ?
assistant
SELECT nationality FROM director WHERE name = 'director_name0';
human
What is the nationality of the actress ' Christoph Waltz ' ?
assistant
SELECT nationality FROM actor WHERE name = "Christoph Waltz" ;