Chinastark/bird_dataset huggingface dataset:
Database: movie_3
Question: Please list the titles of all the films that have more than 2 special features.
Evidence: more than 2 special features refers to Count(special_features) > 2
SQL: SELECT title FROM ( SELECT title, COUNT(special_features) AS num FROM film GROUP BY title ) AS T ORDER BY T.num > 2
Database: movie_3
Question: Please give the full names of all the active staff.
Evidence: full name refers to first_name, last_name; active staff refers to active = 1
SQL: SELECT first_name, last_name FROM staff WHERE active = 1
Database: movie_3
Question: In which year was the film with the highest replacement cost released?
Evidence: highest replacement_cost refers to Max (replacement_cost); year refers to release_year
SQL: SELECT DISTINCT release_year FROM film WHERE replacement_cost = ( SELECT MAX(replacement_cost) FROM film )
Database: movie_3
Question: Please list the titles of the top 3 films with the highest replacement cost.
Evidence: highest replacement_cost refers to Max (replacement_cost); film refers to title
SQL: SELECT title FROM film WHERE replacement_cost = ( SELECT MAX(replacement_cost) FROM film ) LIMIT 3
Database: movie_3
Question: What is the language of the film ACADEMY DINOSAUR?
Evidence: "ACADEMY DINOSAUR" is the title of film; language refers to language.name
SQL: SELECT T2.name FROM film AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'ACADEMY DINOSAUR'
Database: movie_3
Question: How many films are in English?
Evidence: "English" is the name of language
SQL: SELECT COUNT(T1.film_id) FROM film AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE T2.name = 'English'
Database: movie_3
Question: Please list the titles of all the films starring the actor PENELOPE GUINESS.
SQL: SELECT T2.title FROM film_actor AS T1 INNER JOIN film AS T2 ON T1.film_id = T2.film_id INNER JOIN actor AS T3 ON T1.actor_id = T3.actor_id WHERE T3.first_name = 'PENELOPE' AND T3.last_name = 'GUINESS'
Database: movie_3
Question: How many actors have starred in the film ACADEMY DINOSAUR?
Evidence: "ACADEMY DINOSAUR" is the title of film
SQL: SELECT COUNT(T1.actor_id) FROM film_actor AS T1 INNER JOIN film AS T2 ON T1.film_id = T2.film_id WHERE T2.title = 'ACADEMY DINOSAUR'
Database: movie_3
Question: Please list the full names of all the actors that have starred in the film ACADEMY DINOSAUR.
Evidence: full name refers to first_name, last_name; "ACADEMY DINOSAUR" is the title of film
SQL: SELECT T1.first_name, T1.last_name FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'ACADEMY DINOSAUR'
Database: movie_3
Question: Among the films starring PENELOPE GUINESS, how many of them are released in 2006?
Evidence: release in 2006 refers to release_year = 2006;
SQL: SELECT COUNT(T2.film_id) FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.release_year = 2006 AND T1.first_name = 'PENELOPE' AND T1.last_name = 'GUINESS'
Database: movie_3
Question: Please give the title of the film starring PENELOPE GUINESS and has the highest replacement cost.
Evidence: highest replacement cost refers to Max (replacement_cost)
SQL: SELECT T3.title FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'PENELOPE' AND T1.last_name = 'GUINESS' ORDER BY T3.replacement_cost DESC LIMIT 1
Database: movie_3
Question: Please list the full names of all the actors that have starred in the film with the highest replacement cost.
Evidence: highest replacement cost refers to Max (replacement_cost); full name refers to first_name, last_name
SQL: SELECT first_name, last_name FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id ORDER BY T3.replacement_cost DESC LIMIT 1
Database: movie_3
Question: Among the films starring PENELOPE GUINESS, how many of them are in English?
Evidence: "English" is the name of language
SQL: SELECT COUNT(T3.film_id) FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id INNER JOIN language AS T4 ON T3.language_id = T4.language_id WHERE T4.name = 'English' AND T1.first_name = 'PENELOPE' AND T1.last_name = 'GUINESS'
Database: movie_3
Question: What is the title of the film with the longest duration time and stars PENELOPE GUINESS?
Evidence: longest duration of film refers to Max(length)
SQL: SELECT T3.title FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'PENELOPE' AND T1.last_name = 'GUINESS' ORDER BY T3.length DESC LIMIT 1
Database: movie_3
Question: Please list the titles of all the films in the category of "Horror".
Evidence: "Horror" is the name of category
SQL: SELECT T1.title FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'Horror'
Database: movie_3
Question: How many films are there under the category of "Horror"?
Evidence: "Horror" is the name of category
SQL: SELECT COUNT(T1.film_id) FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id WHERE T2.name = 'Horror'
Database: movie_3
Question: Please list the titles of all the films under the category of "Horror" and has a rental rate of $2.99.
Evidence: "Horror" is the name of category; rental rate of $2.99 refers to rental_rate = 2.99
SQL: SELECT T1.title FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'Horror' AND T1.rental_rate = 2.99
Database: movie_3
Question: For how many times has the customer RUTH MARTINEZ rented a film?
Evidence: times of rented refers to Count(rental_id)
SQL: SELECT COUNT(T2.rental_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ'
Database: movie_3
Question: Please list the titles of all the films that the customer RUTH MARTINEZ has rented.
SQL: SELECT T4.title FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ'
Database: movie_3
Question: Among the films that the customer RUTH MARTINEZ has rented, how many of them are released in 2006?
Evidence: release in 2006 refers to release_year = 2006
SQL: SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T4.release_year = 2006 AND T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ'
Database: movie_3
Question: Among the films that the customer RUTH MARTINEZ has rented, what is the title of the one with the highest replacement cost?
Evidence: highest replacement cost refers to Max(replacement_cost)
SQL: SELECT T4.title FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ' ORDER BY T4.replacement_cost DESC LIMIT 1
Database: movie_3
Question: Please list the full names of all the customers who have rented the film with the highest replacement cost.
Evidence: full name refers to first_name, last_name; highest replacement cost refers to Max(replacement_cost)
SQL: SELECT T1.first_name, T1.last_name FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id ORDER BY T4.replacement_cost DESC LIMIT 1
Database: movie_3
Question: How many films rented to the customer RUTH MARTINEZ were returned in August, 2005?
Evidence: returned in August, 2005 refers to year(return_date) = 2005 and month (return_date) = 8
SQL: SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ' AND STRFTIME('%m',T2.return_date) = '8' AND STRFTIME('%Y', T2.return_date) = '2005'
Database: movie_3
Question: Please give the full name of the customer that have rented the most films.
Evidence: full name refers to first_name, last_name; customer who rented the most film refers to Max(count(rental_id))
SQL: SELECT T.first_name, T.last_name FROM ( SELECT T1.first_name, T1.last_name, COUNT(T2.rental_id) AS num FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.first_name, T1.last_name ) AS T ORDER BY T.num DESC LIMIT 1
Database: movie_3
Question: Among the customers who have rented the film ACADEMY DINOSAUR, how many of them are active?
Evidence: "ACADEMY DINOSAUR" is the title of film; customer refers to customer_id; active refers to active = 1
SQL: SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T1.active = 1 AND T4.title = 'ACADEMY DINOSAUR'
Database: movie_3
Question: Which film is rented for the most times by the customers? Please give its title.
Evidence: film refers to title; film rented the most times refers to title where Max(Count(rental_id))
SQL: SELECT T.title FROM ( SELECT T1.title, COUNT(T3.rental_id) AS num FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id INNER JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T1.title ) AS T ORDER BY T.num DESC LIMIT 1
Database: movie_3
Question: Which customer has rented more movies, RUTH MARTINEZ or LINDA WILLIAMS?
Evidence: rented more movie Max(Count(customer_id)); "RUTH MARTINEZ" and "LINDA WILLIAMS" are both full name of customer
SQL: SELECT T.first_name, T.last_name FROM ( SELECT T1.first_name, T1.last_name, COUNT(T1.customer_id) AS num FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE (T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ') OR (T1.first_name = 'LINDA' AND T1.last_name = 'WILLIAMS') GROUP BY T1.first_name, T1.last_name ) AS T ORDER BY T.num DESC LIMIT 1
Database: movie_3
Question: Among all the films starring PENELOPE GUINESS, what is the title of the one with the highest rental price per day?
Evidence: highest rental price per day refers to Max(Divide(rental_rate, rental_duration))
SQL: SELECT T3.title FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'PENELOPE' AND T1.last_name = 'GUINESS' ORDER BY T3.rental_rate / T3.rental_duration DESC LIMIT 1
Database: movie_3
Question: What is the average replacement cost of the films under the category of "Horror"?
Evidence: "Horror" is the name of category; average replacement cost = Divide (Sum(replacement_cost), Count(film_id where name = Horror))
SQL: SELECT AVG(T3.replacement_cost) FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id INNER JOIN film AS T3 ON T1.film_id = T3.film_id WHERE T2.name = 'Horror'
Database: movie_3
Question: Among all films that the customer RUTH MARTINEZ has rented, what is the percentage of it being a Music film?
Evidence: music film refers to name = 'Music'; percentage = Divide (Count(film_id where name = 'Music'), Count(film_id)) * 100
SQL: SELECT CAST(SUM(IIF(T3.name = 'Music', 1, 0)) AS REAL) * 100 / COUNT(T1.film_id) FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id INNER JOIN inventory AS T4 ON T1.film_id = T4.film_id INNER JOIN customer AS T5 ON T4.store_id = T5.store_id INNER JOIN rental AS T6 ON T4.inventory_id = T6.inventory_id WHERE T5.first_name = 'RUTH' AND T5.last_name = 'MARTINEZ'
Database: movie_3
Question: What is the average duration time of the films starring PENELOPE GUINESS?
Evidence: average duration time = AVG(length)
SQL: SELECT AVG(T3.length) FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'PENELOPE' AND T1.last_name = 'GUINESS'
Database: movie_3
Question: Give the number of inactive customers.
Evidence: inactive refers to active = 0
SQL: SELECT COUNT(customer_id) FROM customer WHERE active = 0
Database: movie_3
Question: Who is the owner of email address "JEREMY.HURTADO@sakilacustomer.org"? Give the full name.
Evidence: "JEREMY.HURTADO@sakilacustomer.org" is the email; owner refers to customer; full name refers to first_name, last_name
SQL: SELECT first_name, last_name FROM customer WHERE email = 'JEREMY.HURTADO@sakilacustomer.org'
Database: movie_3
Question: Give the postal code for the address No.65.
Evidence: address no. 65 refers to address_id = 65
SQL: SELECT postal_code FROM address WHERE address_id = 65
Database: movie_3
Question: State the number of addresses in the Nordrhein-Westfalen district.
Evidence: number of address refers to address_id
SQL: SELECT COUNT(address_id) FROM address WHERE district = 'Nordrhein-Westfalen'
Database: movie_3
Question: What is the phone number of address No.72?
Evidence: address no. 72 refers to address_id = 72; phone number refers to phone
SQL: SELECT phone FROM address WHERE address_id = '72'
Database: movie_3
Question: State the number of films that are 178 minutes long.
Evidence: 178 min long refers to length = '178'
SQL: SELECT COUNT(film_id) FROM film WHERE length = '178'
Database: movie_3
Question: Tell the special features of the film Uprising Uptown.
Evidence: "UPRISING UPTOWN" is the title of film
SQL: SELECT special_features FROM film WHERE title = 'UPRISING UPTOWN'
Database: movie_3
Question: What is the description of the film Artist Coldblooded?
Evidence: "ARTIST COLDBLOODED" is the title of film
SQL: SELECT description FROM film WHERE title = 'ARTIST COLDBLOODED'
Database: movie_3
Question: Give the detailed address for store No.2.
Evidence: store no. 22 refers to store_id = 2; detailed address refers to address, address2, district
SQL: SELECT T1.address, T1.address2, T1.district FROM address AS T1 INNER JOIN store AS T2 ON T1.address_id = T2.address_id WHERE T2.store_id = 2
Database: movie_3
Question: Which continent is the mother country of Clarksville city in?
Evidence: "Clarksville" is the city;
SQL: SELECT T1.country FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id WHERE T2.city = 'Clarksville'
Database: movie_3
Question: How many actors played a role in the 2006 film whose rental duration is 7 days, rental rate is 4.99 and is 98 minutes duration?
Evidence: in 2006 refers to release_year = 2006; 98 min duration refers to length = 98; number of actors refers to count(actor_id)
SQL: SELECT COUNT(T1.actor_id) FROM film_actor AS T1 INNER JOIN film AS T2 ON T1.film_id = T2.film_id WHERE T2.release_year = 2006 AND T2.rental_duration = 7 AND T2.rental_duration = 4.99 AND T2.length = 98
Database: movie_3
Question: The actor Dan Harris played in a 77 minute film with replacement cost of 9.99, what was the rating for that film?
Evidence: 77 min film refers to length = 77
SQL: SELECT T3.rating FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'DAN' AND T1.last_name = 'HARRIS' AND T3.length = 77 AND T3.replacement_cost = '9.99'
Database: movie_3
Question: How many films did actor Daryl Wahlberg appear in?
SQL: SELECT COUNT(T1.film_id) FROM film_actor AS T1 INNER JOIN actor AS T2 ON T1.actor_id = T2.actor_id WHERE T2.first_name = 'DARYL' AND T2.last_name = 'WAHLBERG'
Database: movie_3
Question: Sherri Rhodes rented a film at 12:27:27 on 2005/7/28, when did she/he return that film?
Evidence: rented at 12:27:27 on 2005/7/28 refers to rental_date = '2005-07-28 12:27:27'
SQL: SELECT T2.return_date FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'SHERRI' AND T1.last_name = 'RHODES' AND T2.rental_date = '2005-07-28 12:27:27'
Database: movie_3
Question: Give the name of the manager staff for store No.1.
Evidence: store no. 1 refers to store_id = 1; name refers to first_name, last_name
SQL: SELECT T1.first_name, T1.last_name FROM staff AS T1 INNER JOIN store AS T2 ON T1.store_id = T2.store_id WHERE T2.store_id = 1
Database: movie_3
Question: State the address location of store No.1.
Evidence: store no. 1 refers to store_id = 1; address location refers to address, address2, district
SQL: SELECT T1.address, T1.address2, T1.district FROM address AS T1 INNER JOIN store AS T2 ON T1.address_id = T2.address_id WHERE T2.store_id = 1
Database: movie_3
Question: Where does the staff Jon Stephens live?
Evidence: location refers to address, address2, district
SQL: SELECT T1.address, T1.address2 FROM address AS T1 INNER JOIN staff AS T2 ON T1.address_id = T2.address_id WHERE T2.first_name = 'Jon' AND T2.last_name = 'Stephens'
Database: movie_3
Question: How many addresses are there in Woodridge city?
Evidence: "Woodridge" is the city
SQL: SELECT COUNT(T1.address_id) FROM address AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.city = 'Woodridge'
Database: movie_3
Question: Give the address location of Heather Morris.
Evidence: address location refers to address
SQL: SELECT T1.address FROM address AS T1 INNER JOIN customer AS T2 ON T1.address_id = T2.address_id WHERE T2.first_name = 'HEATHER' AND T2.last_name = 'MORRIS'
Database: movie_3
Question: Give the email address of the person who lives in "1411 Lillydale Drive".
Evidence: "1411 Lillydate Drive" is the address
SQL: SELECT T2.email FROM address AS T1 INNER JOIN staff AS T2 ON T1.address_id = T2.address_id WHERE T1.address = '1411 Lillydale Drive'
Database: movie_3
Question: How much money did the customer No.297 pay for the rental which happened at 12:27:27 on 2005/7/28?
Evidence: customer no. 297 refers to customer_id = 297; at 12:27:27 on 2005/7/28 refers to rental_date = '2005-07-28 12:27:27'; money pay for rent refers to amount
SQL: SELECT T1.amount FROM payment AS T1 INNER JOIN rental AS T2 ON T1.rental_id = T2.rental_id WHERE T2.rental_date = '2005-07-28 12:27:27' AND T2.customer_id = 297
Database: movie_3
Question: Which category does the film Working Microcosmos belong to?
Evidence: "WORKING MICROCOSMOS" is the title of film; category refers to name
SQL: SELECT T3.name FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T1.title = 'WORKING MICROCOSMOS'
Database: movie_3
Question: Give the number of documentary films.
Evidence: "Documentary" is the name of category; number of film refers to Count(film_id)
SQL: SELECT COUNT(T1.film_id) FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id WHERE T2.name = 'Documentary'
Database: movie_3
Question: State the name of the category which has the most number of films.
Evidence: category refers to name; most number of films refers to Max(Count(film_id))
SQL: SELECT T.name FROM ( SELECT T2.name, COUNT(T1.film_id) AS num FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T2.name ) AS T ORDER BY T.num DESC LIMIT 1
Database: movie_3
Question: Give the name of the film for inventory No.3479.
Evidence: inventory no. 3479 refers to inventory_id = '3479'; name of film refers to title
SQL: SELECT T1.title FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T2.inventory_id = 3479
Database: movie_3
Question: What is the percentage more for the rental payment for store No.2 than store No.1?
Evidence: store no. 1 refers to store_id = 1; store no.2 refers to store_id = 2; rental payment refers to amount; percent more = Divide (Subtract(amount where store_id = 2, amount where store_id = 1), amount where store_id = 1) *100
SQL: SELECT CAST((SUM(IIF(T2.store_id = 2, T1.amount, 0)) - SUM(IIF(T2.store_id = 1, T1.amount, 0))) AS REAL) * 100 / SUM(IIF(T2.store_id = 1, T1.amount, 0)) FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id INNER JOIN store AS T3 ON T2.store_id = T3.store_id
Database: movie_3
Question: How many times is the number of Indian cities than Italian cities?
Evidence: indian refers to country = 'India'; Italian refers to country = 'Italy'; times = Divide(Count(city where country = 'India), Count(city where country = 'Italy'))
SQL: SELECT CAST(SUM(IIF(T1.country = 'India', 1, 0)) AS REAL) / SUM(IIF(T1.country = 'Italy', 1, 0)) FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id
Database: movie_3
Question: How many times is the number of films Gina DeGeneres acted in than Penelope Guinness?
Evidence: "Gina DeGeneres" and "Penelope Guinness" are both full name of actor; times number of film = Divide (Count (film_id where first_name = 'GINA' and last_name = 'DEGENERES'), Count(film_id where first_name = 'PENELOPE' and last_name = 'GUINESS'))
SQL: SELECT CAST(SUM(IIF(T2.first_name = 'GINA' AND T2.last_name = 'DEGENERES', 1, 0)) AS REAL) * 100 / SUM(IIF(T2.first_name = 'PENELOPE' AND T2.last_name = 'GUINESS', 1, 0)) FROM film_actor AS T1 INNER JOIN actor AS T2 ON T1.actor_id = T2.actor_id
Database: movie_3
Question: In 2006, how many restricted films were released?
Evidence: restricted refers to rating = 'R'; release refers to release_year; in 2006 refers to release_year = 2006; film refers to title
SQL: SELECT COUNT(film_id) FROM film WHERE rating = 'R' AND release_year = 2006
Database: movie_3
Question: How many actors starred in the film id 508?
SQL: SELECT COUNT(actor_id) FROM film_actor WHERE film_id = 508
Database: movie_3
Question: What are the special features for the film "Smoochy Control"?
Evidence: "SMOOCHY CONTROL" is the title of film
SQL: SELECT special_features FROM film WHERE title = 'SMOOCHY CONTROL'
Database: movie_3
Question: How many customers paid over the amount of 10 on August 2005?
Evidence: over the amount of 10 refers to amount > 10; paid on August 2005 refers to payment_date like '2005_08%'; customer refers to customer_id
SQL: SELECT COUNT(customer_id) FROM payment WHERE SUBSTR(payment_date, 1, 7) LIKE '2005-08'
Database: movie_3
Question: List the names of the films that are more than 180 minutes long.
Evidence: more than 180 min long refers to length > 180; name of film refers to title
SQL: SELECT title FROM film WHERE length > 180
Database: movie_3
Question: How much is the total rental payment for the first 10 rentals?
Evidence: first 10 rental refers to rental id between 1 and 10; total rental payment refers to sum(amount)
SQL: SELECT SUM(amount) FROM payment WHERE rental_id BETWEEN 1 AND 10
Database: movie_3
Question: What are the full names of all the active employees?
Evidence: active employee refers to active = 1; full name refers to first_name, last_name
SQL: SELECT first_name, last_name FROM staff WHERE active = 1
Database: movie_3
Question: Who is the staff manager in store id 2?
Evidence: staff manager refers to manager_staff_id
SQL: SELECT manager_staff_id FROM store WHERE store_id = 2
Database: movie_3
Question: How many rentals were returned on 5/27/2005?
Evidence: return on 5/27/2005 refers to return_date = '2005-05-27'; rental refers to rental_id
SQL: SELECT COUNT(rental_id) FROM rental WHERE rental_date = '2005-05-27'
Database: movie_3
Question: What are the names of the movies which Laura Brody starred in?
Evidence: name of movie refers to title
SQL: SELECT T3.title FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'Laura' AND T1.last_name = 'Brody'
Database: movie_3
Question: List the name of the films that can only be found in store id 2.
Evidence: name of film refers to title
SQL: SELECT T1.title FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T2.store_id = 2