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
Find all movies about nuclear weapons
assistant
SELECT t3.title FROM tags AS t2 JOIN keyword AS t1 ON t2.kid = t1.id JOIN movie AS t3 ON t2.msid = t3.mid WHERE t1.keyword = 'nuclear weapons';
human
Find all movies written by ' Matt Damon '
assistant
SELECT t1.title FROM written_by AS t3 JOIN movie AS t1 ON t3.msid = t1.mid JOIN writer AS t2 ON t3.wid = t2.wid WHERE t2.name = 'Matt Damon';
human
What year is the movie ' The Imitation Game ' from ?
assistant
SELECT release_year FROM movie WHERE title = 'The Imitation Game';
human
What was the budget of the movie Juno from 2007 ?
assistant
SELECT budget FROM movie WHERE release_year = 2007 AND title = 'Juno';
human
Find the name and budget of the latest movie by ' Quentin Tarantino '
assistant
SELECT t3.budget , t3.title FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = 'Quentin Tarantino' ORDER BY t3.release_year DESC LIMIT 1;
human
How much was the budget of ' Finding Nemo
assistant
SELECT budget FROM movie WHERE title = "Finding Nemo" ;