problem
stringlengths
121
422
db_id
stringclasses
69 values
solution
stringlengths
23
804
Write SQL query to solve given problem: For movies with the keyword of "civil war", calculate the average revenue generated by these movies.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT AVG(T1.revenue) FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id WHERE T3.keyword_name = 'civil war'
Write SQL query to solve given problem: Find out the popularity of the movies with the highest vote count.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT popularity FROM movie ORDER BY vote_COUNT DESC LIMIT 1
Write SQL query to solve given problem: Among the zero-budget movie titles, which one has made the highest revenue?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT title FROM movie WHERE budget = 0 ORDER BY revenue DESC LIMIT 1
Write SQL query to solve given problem: What is the ID of the production company which produced the movie "Gladiator"?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T2.company_id FROM movie AS T1 INNER JOIN movie_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title = 'Gladiator'
Write SQL query to solve given problem: List down the IDs of the production companies that released the movies in 1916.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T2.company_id FROM movie AS T1 INNER JOIN movie_company AS T2 ON T1.movie_id = T2.movie_id WHERE CAST(STRFTIME('%Y', T1.release_date) AS INT) = 1916
Write SQL query to solve given problem: List down the movies produced by Lucasfilm.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T3.title FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name = 'Lucasfilm'
Write SQL query to solve given problem: Among Warner Bros. Pictures' movies, which title made the highest revenue?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T3.title FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name = 'Warner Bros. Pictures' ORDER BY T3.revenue DESC LIMIT 1
Write SQL query to solve given problem: Write down the release date of the movies produced by Twentieth Century Fox Film Corporation.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T3.release_date FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name = 'Twentieth Century Fox Film Corporation'
Write SQL query to solve given problem: What is the language ID of the movie "Walk the Line"?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T2.language_id FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title = 'Walk the Line'
Write SQL query to solve given problem: Find out the language ID of the movie with the highest popularity.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T2.language_id FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id ORDER BY T1.popularity DESC LIMIT 1
Write SQL query to solve given problem: Tell the language of the movie "C'era una volta il West".. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T3.language_name FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id WHERE T1.title LIKE 'C%era una volta il West'
Write SQL query to solve given problem: Are there any post-production movies in Nederlands?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT DISTINCT CASE WHEN T1.movie_status = 'Post Production' THEN 'YES' ELSE 'NO' END AS YORN FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id WHERE T3.language_name = 'Nederlands'
Write SQL query to solve given problem: List down the tagline of the Polski movies.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT DISTINCT T1.tagline FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id WHERE T3.language_name = 'Polski'
Write SQL query to solve given problem: Provide the homepage of the Bahasa Indonesia movies.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT DISTINCT T1.homepage FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id WHERE T3.language_name = 'Bahasa indonesia'
Write SQL query to solve given problem: Work out the difference in revenues made between the English and Latin movies.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT SUM(CASE WHEN T3.language_name = 'English' THEN T1.revenue ELSE 0 END) - SUM(CASE WHEN T3.language_name = 'Latin' THEN T1.revenue ELSE 0 END) AS DIFFERENCE FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id
Write SQL query to solve given problem: Calculate the revenues made by Fantasy Films and Live Entertainment.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT SUM(T3.revenue) FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name IN ('Fantasy Films', 'Live Entertainment')
Write SQL query to solve given problem: What is the average revenue made by Latin movies?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT AVG(T1.revenue) FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id WHERE T3.language_name = 'Latin'
Write SQL query to solve given problem: What is the most common first name?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT person_name FROM person GROUP BY person_name ORDER BY COUNT(person_name) DESC LIMIT 1
Write SQL query to solve given problem: What is the average number of crews for a movie?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT CAST(SUM(CD) AS REAL) / COUNT(movie_id) FROM ( SELECT movie_id, COUNT(person_id) AS CD FROM movie_crew GROUP BY movie_id )
Write SQL query to solve given problem: List all the keywords with "christmas" in them.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT keyword_name FROM keyword WHERE keyword_name LIKE '%christmas%'
Write SQL query to solve given problem: What is the longest runtime of all movies?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT MAX(runtime) FROM movie
Write SQL query to solve given problem: Provide the overview for the movie "The Pacifier".. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT overview FROM movie WHERE title = 'The Pacifier'
Write SQL query to solve given problem: How many movies were produced by "Eddie Murphy Productions"?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT COUNT(T1.movie_id) FROM movie_company AS T1 INNER JOIN production_company AS T2 ON T1.company_id = T2.company_id WHERE T2.company_name = 'Eddie Murphy Productions'
Write SQL query to solve given problem: List all the actors who have played characters with "captain" in their names.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT DISTINCT T1.person_name FROM person AS T1 INNER JOIN movie_cast AS T2 ON T1.person_id = T2.person_id WHERE T2.character_name LIKE '%captain%'
Write SQL query to solve given problem: What is the most common keyword among all the movies released in 2006?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T3.keyword_name FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id WHERE T1.release_date LIKE '2006%' GROUP BY T3.keyword_name ORDER BY COUNT(T3.keyword_name) DESC LIMIT 1
Write SQL query to solve given problem: How many movies have "vi" as their language code?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT COUNT(T1.movie_id) FROM movie_languages AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE T2.language_code = 'vi'
Write SQL query to solve given problem: What is the third least common genre?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T2.genre_name FROM movie_genres AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.genre_id GROUP BY T2.genre_id ORDER BY COUNT(T1.movie_id) LIMIT 2, 1
Write SQL query to solve given problem: What is the original language of the movie with the tagline "An offer you can't refuse."?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T3.language_name FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id INNER JOIN language_role AS T4 ON T2.language_role_id = T4.role_id WHERE T4.language_role = 'Original' AND T1.tagline LIKE 'An offer you can%t refuse.'
Write SQL query to solve given problem: Provide the average revenue of all the French movies.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT AVG(T1.revenue) FROM movie AS T1 INNER JOIN production_COUNTry AS T2 ON T1.movie_id = T2.movie_id INNER JOIN COUNTry AS T3 ON T2.COUNTry_id = T3.COUNTry_id WHERE T3.COUNTry_name = 'France'
Write SQL query to solve given problem: List all the unspecified gender characters.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T1.character_name FROM movie_cast AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.gender_id WHERE T2.gender = 'Unspecified'
Write SQL query to solve given problem: What are the top 5 most popular movie directors?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T3.person_name FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T2.job = 'Director' ORDER BY T1.popularity DESC LIMIT 5
Write SQL query to solve given problem: List the film with the highest budget in each genre.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T3.genre_name, MAX(T1.budget) FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id GROUP BY T3.genre_name
Write SQL query to solve given problem: What is the title of the movie with the most keywords?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T1.title FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id GROUP BY T1.title ORDER BY COUNT(T2.keyword_id) DESC LIMIT 1
Write SQL query to solve given problem: Which department has the most people?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T1.department_name FROM department AS T1 INNER JOIN movie_crew AS T2 ON T1.department_id = T2.department_id GROUP BY T1.department_id ORDER BY COUNT(T2.department_id) DESC LIMIT 1
Write SQL query to solve given problem: What percentage of films are made in the US?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT CAST(COUNT(CASE WHEN T3.COUNTry_iso_code = 'US' THEN T1.movie_id ELSE NULL END) AS REAL) * 100 / COUNT(T1.movie_id) FROM movie AS T1 INNER JOIN production_COUNTry AS T2 ON T1.movie_id = T2.movie_id INNER JOIN COUNTry AS T3 ON T2.COUNTry_id = T3.COUNTry_id
Write SQL query to solve given problem: What is the average ratio between female and male actors in a movie?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT CAST(COUNT(CASE WHEN T2.gender = 'Female' THEN T1.person_id ELSE NULL END) AS REAL) / COUNT(CASE WHEN T2.gender = 'Male' THEN T1.person_id ELSE NULL END) FROM movie_cast AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.gender_id
Write SQL query to solve given problem: List the movies released in 1945.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT title FROM movie WHERE CAST(STRFTIME('%Y', release_date) AS INT) = 1945
Write SQL query to solve given problem: List the character names played by Catherine Deneuve.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T2.character_name FROM person AS T1 INNER JOIN movie_cast AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Catherine Deneuve'
Write SQL query to solve given problem: List the movies in the Somali language.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T1.title FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id WHERE T3.language_name = 'Somali'
Write SQL query to solve given problem: Provide the release date and language of the most popular movie.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T1.release_date, T3.language_name FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id ORDER BY T1.popularity DESC LIMIT 1
Write SQL query to solve given problem: What is the original language of the "Four Rooms" movie?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T3.language_name FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id INNER JOIN language_role AS T4 ON T2.language_role_id = T4.role_id WHERE T4.language_role = 'Original' AND T1.title = 'Four Rooms'
Write SQL query to solve given problem: List the character names in the "Open Water" movie.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T2.character_name FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title = 'Open Water'
Write SQL query to solve given problem: Who is the main actor in the "Pirates of the Caribbean: At World's End" movie?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T3.person_name FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T1.title LIKE 'Pirates of the Caribbean: At World%s End' ORDER BY T2.cast_order LIMIT 1
Write SQL query to solve given problem: List the names of camera supervisors in the crew.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T1.person_name FROM person AS T1 INNER JOIN movie_crew AS T2 ON T1.person_id = T2.person_id WHERE T2.job = 'Camera Supervisor'
Write SQL query to solve given problem: List the job titles of Sally Menke in the crew.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT DISTINCT T2.job FROM person AS T1 INNER JOIN movie_crew AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Sally Menke'
Write SQL query to solve given problem: Provide the names and departments of the person who worked as a music editor in the "Pirates of the Caribbean: At World's End" movie.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T3.person_name, T4.department_name FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id INNER JOIN department AS T4 ON T2.department_id = T4.department_id WHERE T1.title LIKE 'Pirates of the Caribbean: At World%s End' AND T2.job = 'Music Editor'
Write SQL query to solve given problem: Provide the titles and revenues of the movies produced by the DreamWorks company.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T1.title, T1.revenue FROM movie AS T1 INNER JOIN movie_company AS T2 ON T1.movie_id = T2.movie_id INNER JOIN production_company AS T3 ON T2.company_id = T3.company_id WHERE T3.company_name = 'DreamWorks'
Write SQL query to solve given problem: How many movies were produced in Canada?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT COUNT(T2.movie_id) FROM COUNTry AS T1 INNER JOIN production_COUNTry AS T2 ON T1.COUNTry_id = T2.COUNTry_id WHERE T1.COUNTry_name = 'Canada'
Write SQL query to solve given problem: List the genres of Forrest Gump movie.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T3.genre_name FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id WHERE T1.title = 'Forrest Gump'
Write SQL query to solve given problem: Provide the production companies of the movie that has over 35% average running time per movie in 2016.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T.company_name FROM ( SELECT DISTINCT T3.company_name, T1.runtime FROM movie AS T1 INNER JOIN movie_company AS T2 ON T1.movie_id = T2.movie_id INNER JOIN production_company AS T3 ON T3.company_id = T2.company_id WHERE T1.release_date LIKE '2016%' ) T WHERE T.runtime * 100 > (0.35 * ( SELECT AVG(T1.runtime) FROM movie AS T1 INNER JOIN movie_company AS T2 ON T1.movie_id = T2.movie_id INNER JOIN production_company AS T3 ON T3.company_id = T2.company_id WHERE T1.release_date LIKE '2016%' ) + ( SELECT AVG(T1.runtime) FROM movie AS T1 INNER JOIN movie_company AS T2 ON T1.movie_id = T2.movie_id INNER JOIN production_company AS T3 ON T3.company_id = T2.company_id WHERE T1.release_date LIKE '2016%' )) * 100
Write SQL query to solve given problem: Find the difference in percentage of the movies under keywords of "woman director" and "independent film".. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT CAST((SUM(CASE WHEN T1.keyword_name = 'woman director' THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.keyword_name = 'independent film' THEN 1 ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T1.keyword_name = 'independent film' THEN 1 ELSE 0 END) FROM keyword AS T1 INNER JOIN movie_keywords AS T2 ON T1.keyword_id = T2.keyword_id
Write SQL query to solve given problem: Which genre does the movie Dancer in the Dark belong to?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T3.genre_name FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id WHERE T1.title = 'Dancer in the Dark'
Write SQL query to solve given problem: How many adventure movies are there that were released in 2000?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT COUNT(T1.movie_id) FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id WHERE T3.genre_name = 'Adventure' AND CAST(STRFTIME('%Y', T1.release_date) AS INT) = 2000
Write SQL query to solve given problem: Which movies did the company Paramount Pictures produce in 2000?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T3.title FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name = 'Paramount Pictures' AND CAST(STRFTIME('%Y', T3.release_date) AS INT) = 2000
Write SQL query to solve given problem: What keyword can the user use to search for the movie Finding Nemo?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T3.keyword_name FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id WHERE T1.title = 'Finding Nemo'
Write SQL query to solve given problem: Name the horror movies with positive ratings greater than 7.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T1.title FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id WHERE T3.genre_name = 'Horror' AND T1.vote_average > 7
Write SQL query to solve given problem: How many production companies made more than 150 movies?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT COUNT(*) FROM ( SELECT T1.company_name AS CNAME FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id HAVING COUNT(T1.company_name) > 150 )
Write SQL query to solve given problem: What is the role of Mark Hammel?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T2.job FROM person AS T1 INNER JOIN movie_crew AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Mark Hammel'
Write SQL query to solve given problem: How many main actors are there in the movie Pirates of the Caribbean: At World's End?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT COUNT(T2.cast_order) FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN gender AS T3 ON T3.gender_id = T2.gender_id WHERE T3.gender = 'Male' OR T3.gender = 'Female' AND T1.title = 'Pirates of the Caribbean: At World''s End' AND T2.cast_order = ( SELECT MIN(T2.cast_order) FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN gender AS T3 ON T3.gender_id = T2.gender_id WHERE T3.gender = 'Male' OR T3.gender = 'Female' AND T1.title = 'Pirates of the Caribbean: At World''s End' )
Write SQL query to solve given problem: Which movies have the participation of actor Harrison Ford?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T1.title FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T3.person_name = 'Harrison Ford'
Write SQL query to solve given problem: Which character did Orlando Bloom play in the movie Pirates of the Caribbean: The Curse of the Black Pearl?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T2.character_name FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T1.title = 'Pirates of the Caribbean: The Curse of the Black Pearl' AND T3.person_name = 'Orlando Bloom'
Write SQL query to solve given problem: What is the average number of horror movies among all movies genre?. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT CAST(COUNT(CASE WHEN T3.genre_name = 'Horror' THEN T1.movie_id ELSE NULL END) AS REAL) / COUNT(T1.movie_id) FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id
Write SQL query to solve given problem: List the names of all the producers in the movie "Pirates of the Caribbean: At World's End".. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT T3.person_name FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T1.title = 'Pirates of the Caribbean: The Curse of the Black Pearl' AND T2.job = 'Producer'
Write SQL query to solve given problem: Calculate the average income made by movies using the keyword "paris". List the title of the movies.. Keep the solution inside sql tag ```sql [SQL-Query] ```
movies_4
SELECT AVG(T1.revenue), T1.title FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id WHERE T3.keyword_name = 'paris'
Write SQL query to solve given problem: How many English language codes whose comments for the method are in the XML format?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT COUNT(Lang) FROM Method WHERE Lang = 'en' AND CommentIsXml = 1
Write SQL query to solve given problem: What is the task of the method whose tokenized name is "online median filter test median window filling"?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT SUBSTR(SUBSTR(Name, INSTR(Name, '.') + 1), 1, INSTR(SUBSTR(Name, INSTR(Name, '.') + 1), '.') - 1) task FROM Method WHERE NameTokenized = 'online median filter test median window filling'
Write SQL query to solve given problem: What is the id of the repository with the highest number of solution path?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT RepoId FROM solution GROUP BY RepoId ORDER BY COUNT(Path) DESC LIMIT 1
Write SQL query to solve given problem: What is the github address of the "nofear_Mara\Mara.sln" solution path?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT Url FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE Path = 'nofear_MaraMara.sln'
Write SQL query to solve given problem: Which repository has the longest amount of processed time of downloading? Indicate whether the solution paths in the repository can be implemented without needs of compilation.. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT DISTINCT T1.id, T2.WasCompiled FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.ProcessedTime = ( SELECT MAX(ProcessedTime) FROM Repo )
Write SQL query to solve given problem: What is the tokenized name of the solution whose path is "maravillas_linq-to-delicious\tasty.sln"?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT DISTINCT T2.NameTokenized FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.Path = 'maravillas_linq-to-delicious'
Write SQL query to solve given problem: Among the repositories whose number of stars received are between 6,000 to 9,000, which repository has the highest number of solution paths and many of those solution paths needs to be compiled if user wants to implement it?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT T2.RepoId, COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Stars BETWEEN 6000 AND 9000 AND T2.WasCompiled = 0 GROUP BY T2.RepoId ORDER BY COUNT(T2.RepoId) DESC LIMIT 1
Write SQL query to solve given problem: In the "https://github.com/wallerdev/htmlsharp.git", give all the linearized sequenced of API calls.. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT T3.ApiCalls FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId INNER JOIN Method AS T3 ON T2.Id = T3.SolutionId WHERE T1.Url = 'https://github.com/wallerdev/htmlsharp.git'
Write SQL query to solve given problem: How many solution paths are there inside the 2nd most popular repository?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT COUNT(DISTINCT T2.Path) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Watchers = ( SELECT Watchers FROM Repo ORDER BY Watchers DESC LIMIT 1, 1 )
Write SQL query to solve given problem: What is the average processed time of the solution paths inside the "https://github.com/zphingphong/DiscardCustomerApp.git"?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT CAST(SUM(T2.ProcessedTime) AS REAL) / COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Url = 'https://github.com/zphingphong/DiscardCustomerApp.git'
Write SQL query to solve given problem: What is the full comment on the method whose solution path is "bmatzelle_nini\Source\Nini.sln" with a tokenized name of "alias text add alias"?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT T2.FullComment FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.Path = 'bmatzelle_niniSourceNini.sln' AND T2.NameTokenized = 'alias text add alias'
Write SQL query to solve given problem: What is the linearized sequenced of API calls of the method whose solution path is "mauriciodeamorim_tdd.encontro2\Tdd.Encontro2.sln"?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT T2.ApiCalls FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.Path = 'mauriciodeamorim_tdd.encontro2Tdd.Encontro2.sln'
Write SQL query to solve given problem: How many solution paths that needs to be compiled if user wants to implement it in "https://github.com/jeffdik/tachy.git"?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT COUNT(T2.Path) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Url = 'https://github.com/jeffdik/tachy.git' AND T2.WasCompiled = 0
Write SQL query to solve given problem: How much is the processed time of the method whose tokenized name is "about box1 dispose"? Indicate the language of the method.. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT DISTINCT T1.ProcessedTime, T2.Lang FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized = 'about box1 dispose'
Write SQL query to solve given problem: In "maxild_playground\Playground.sln", what is the time of sampling for the method "GitHubRepo.Cli.GitHubClientWrapper.GetReleases"?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT T2.SampledAt FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.Path = 'maxild_playgroundPlayground.sln' AND T2.Name = 'GitHubRepo.Cli.GitHubClientWrapper.GetReleases'
Write SQL query to solve given problem: What is the language of the method used in the solution path "opendns_diagnosticapp\windows\OpenDnsDiagnostic.sln"?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT T2.Lang FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.Path = 'opendns_diagnosticappwindowsOpenDnsDiagnostic.sln'
Write SQL query to solve given problem: What's the task of the method whose tokenized name is "html parser feed"?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT SUBSTR(SUBSTR(Name, INSTR(Name, '.') + 1), 1, INSTR(SUBSTR(Name, INSTR(Name, '.') + 1), '.') - 1) task FROM Method WHERE NameTokenized = 'html parser feed'
Write SQL query to solve given problem: Are the comments for the method "HtmlSharp.HtmlParser.Feed" in XML format?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT CASE WHEN CommentIsXml = 0 THEN 'No' WHEN CommentIsXml = 1 THEN 'Yes' END isXMLFormat FROM Method WHERE Name = 'HtmlSharp.HtmlParser.Feed'
Write SQL query to solve given problem: Which method has the summary "Write a command to the log"?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT Name FROM Method WHERE Summary = 'Write a command to the log'
Write SQL query to solve given problem: What is the github address of the repository that contains files used by solution ID12?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT T1.Url FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 12
Write SQL query to solve given problem: Among the solutions that contain files within the repository followed by over 1000 people, how many of them can be implemented without needs of compilation?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Forks > 1000 AND T2.WasCompiled = 1
Write SQL query to solve given problem: Which solution contains files within a more popular repository, the solution ID18 or solution ID19?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT CASE WHEN SUM(CASE WHEN T2.Id = 18 THEN T1.Watchers ELSE 0 END) > SUM(CASE WHEN T2.Id = 19 THEN T1.Watchers ELSE 0 END) THEN 'SolutionID18' WHEN SUM(CASE WHEN T2.Id = 18 THEN T1.Watchers ELSE 0 END) < SUM(CASE WHEN T2.Id = 19 THEN T1.Watchers ELSE 0 END) THEN 'SolutionID19' END isMorePopular FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId
Write SQL query to solve given problem: Among the solutions that contain files within the repository needing the longest processed time to download, how many of them doesn't need to be compiled if user wants to implement it?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.ProcessedTime = ( SELECT MAX(ProcessedTime) FROM Repo ) AND T2.WasCompiled = 1
Write SQL query to solve given problem: What is the processed time to download the repository whose files are contained in the solution with the path "jeffdik_tachy\src\Tachy.sln".. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT DISTINCT T2.ProcessedTime FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Path = 'jeffdik_tachysrcTachy.sln'
Write SQL query to solve given problem: Please give the url of the repository whose files are contained in solution ID 9?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT T1.Url FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 9
Write SQL query to solve given problem: Please list all the paths of the solutions containing files within the repository whose url is "https://github.com/maxild/playground.git".. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT T2.Path FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Url = 'https://github.com/maxild/playground.git'
Write SQL query to solve given problem: Among the repositories with over 200 likes, how many of them have files contained by solutions with a processed time of under 636439500080712000?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.ProcessedTime < 636439500080712000 AND T1.Stars > 200
Write SQL query to solve given problem: Please list the IDs of the solutions that contain files within the top 3 followed repositories.. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT T2.Id FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId ORDER BY T1.Forks DESC LIMIT 3
Write SQL query to solve given problem: What is the average time needed for the solutions containing files within the repository whose url is "https://github.com/jeffdik/tachy.git" to be processd?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT CAST(SUM(T2.ProcessedTime) AS REAL) / COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Url = 'https://github.com/jeffdik/tachy.git'
Write SQL query to solve given problem: How many more followers in percentage are there for the repository used by solution ID 18 than solution ID19?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT CAST((SUM(CASE WHEN T2.Id = 18 THEN T1.Forks ELSE 0 END) - SUM(CASE WHEN T2.Id = 19 THEN T1.Forks ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T2.Id = 19 THEN T1.Forks ELSE 0 END) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId
Write SQL query to solve given problem: How many stars does the repository of the solution No. 45997 have?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT T1.Stars FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 45997
Write SQL query to solve given problem: For the repository which got '8094' Stars, how many solutions does it contain?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Stars = 8094
Write SQL query to solve given problem: For the method which got the tokenized name as 'interp parser expr', what is the processed time for its solution?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT T1.ProcessedTime FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized = 'interp parser expr'
Write SQL query to solve given problem: For the repository with '8094' watchers , how many solutions does it contain?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Watchers = 8094
Write SQL query to solve given problem: Give the repository Url of the one with most solutions.. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT T1.Url FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId GROUP BY T2.RepoId ORDER BY COUNT(T2.RepoId) DESC LIMIT 1
Write SQL query to solve given problem: How many solutions does the repository which has 1445 Forks contain?. Keep the solution inside sql tag ```sql [SQL-Query] ```
codebase_comments
SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Forks = 1445