human
Schema:
book_club (book_club_id, Year, Author_or_Editor, Book_Title, Publisher, Category, Result)
movie (movie_id, Title, Year, Director, Budget_million, Gross_worldwide)
culture_company (Company_name, Type, Incorporated_in, Group_Equity_Shareholding, book_club_id, movie_id)
Please answer with SQL.
assistant
Sure, I understand.
human
show the titles, and authors or editors for all books made after the year 1989.
assistant
SELECT book_title , author_or_editor FROM book_club WHERE YEAR > 1989
human
Show all director names who have a movie in both year 1999 and 2000.
assistant
SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999
human
Show all director names who have a movie in the year 1999 or 2000.
assistant
SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000
human
Show all movie titles, years, and directors, ordered by budget.
assistant
SELECT title , YEAR , director FROM movie ORDER BY budget_million
human
Show all company names with a movie directed in year 1999.
assistant
SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999
human
Show the movie titles and book titles for all companies in China.
assistant
SELECT T1.title , T3.book_title FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id JOIN book_club AS T3 ON T3.book_club_id = T2.book_club_id WHERE T2.incorporated_in = "China" ;