Chinastark/bird_dataset huggingface dataset:
Database: movie_3
Question: Among the films starred by Nick Wahlberg, what is the percentage of the films with G rating?
Evidence: 'Nick Wahlberg' is a full name of an actor; full name refers to first_name, last_name; G rating refers to rating = 'G'; calculation = DIVIDE(SUM(rating = 'G'), SUM(rating)) * 100
SQL: SELECT CAST(SUM(IIF(T3.rating = 'G', 1, 0)) AS REAL) / 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 WHERE T1.first_name = 'Elvis' AND T1.last_name = 'Marx'
Database: movie_3
Question: List the address in Texas in the ascending order of city id.
Evidence: 'Texas' is a district
SQL: SELECT address FROM address WHERE district = 'Texas' AND city_id = ( SELECT MIN(city_id) FROM address WHERE district = 'Texas' )
Database: movie_3
Question: Find the full name and email address of inactive customers whose record was created in 2006.
Evidence: full name refers to first_name, last_name; record created in 2006 refers to create_date = 2006; inactive customers refers to active = 0
SQL: SELECT first_name, last_name, email FROM customer WHERE STRFTIME('%Y',create_date) = '2006' AND active = 0
Database: movie_3
Question: What percentage of the movies are PG-13?
Evidence: PG-13 is a rating; calculation = DIVIDE(SUM(rating = PG-13), SUM(rating)) * 100
SQL: SELECT CAST(SUM(IIF(rating = 'PG-13', 1, 0)) AS REAL) * 100 / COUNT(film_id) FROM film
Database: movie_3
Question: Please list the top ten movies with the most price per day in descending order of price per day.
Evidence: movies with the most price per day refers to MAX(rental_rate)
SQL: SELECT title FROM film ORDER BY rental_rate / rental_duration DESC LIMIT 10
Database: movie_3
Question: Calculate the average rent amount paid by the customer with customer id 15.
Evidence: average rent amount refers to AVG(amount)
SQL: SELECT AVG(amount) FROM payment WHERE customer_id = 15
Database: movie_3
Question: How many customers rented for an above-average period?
Evidence: rented period refers to SUBTRACT(return_date, rental_date); calculation = rented period > (AVG(rented period))
SQL: SELECT COUNT(customer_id) FROM rental WHERE return_date - rental_date > ( SELECT AVG(return_date - rental_date) FROM rental )
Database: movie_3
Question: Among the movies, what percentage are horror?
Evidence: horror is a name of film category; calculation = DIVIDE(COUNT('horror'), COUNT(category_id)) * 100
SQL: SELECT CAST(SUM(IIF(T2.name = 'horror', 1, 0)) AS REAL) * 100 / COUNT(T2.category_id) FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id
Database: movie_3
Question: Give the full name of the actor who acted in the most number of movies?
Evidence: full name refers to first_name, last_name; acted in the most number of movies refers to MAX(COUNT(film_id))
SQL: SELECT T.first_name, T.last_name FROM ( SELECT T2.first_name, T2.last_name, COUNT(T1.film_id) AS num FROM film_actor AS T1 INNER JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.first_name, T2.last_name ) AS T ORDER BY T.num DESC LIMIT 1
Database: movie_3
Question: Give the full name of the actor who acted the most in drama movies?
Evidence: full name refers to first_name, last_name; drama is a category of a film; acted the most in a movies refers to MAX(COUNT(film_id))
SQL: SELECT T.first_name, T.last_name FROM ( SELECT T1.first_name, T1.last_name, COUNT(T2.film_id) AS num FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film_category AS T3 ON T2.film_id = T3.film_id WHERE T3.category_id = 7 GROUP BY T1.first_name, T1.last_name ) AS T ORDER BY T.num DESC LIMIT 1
Database: movie_3
Question: What is the difference in the average number of films rented each day in Australia and Canada?
Evidence: 'Australia' AND 'Canada' are country; average number of films refers to AVG('Australia') AND AVG('Canada'); calculation = SUBTRACT(AVG('Australia'), AVG('Canada'))
SQL: SELECT AVG(IIF(T4.country = 'Australia', 1, 0)) - AVG(IIF(T4.country = 'Canada', 1, 0)) AS diff FROM customer AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id INNER JOIN city AS T3 ON T2.city_id = T3.city_id INNER JOIN country AS T4 ON T3.country_id = T4.country_id
Database: movie_3
Question: Of the movies in which Reese Kilmer acted, what percentage are action movies?
Evidence: 'Reese Kilmer' is a full name of an actor; 'action' is the name of the category; calculation = DIVIDE(COUNT('action'), COUNT(category_id)) * 100
SQL: SELECT CAST(SUM(IIF(T4.name = 'Action', 1, 0)) AS REAL) * 100 / COUNT(T1.actor_id) FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film_category AS T3 ON T2.film_id = T3.film_id INNER JOIN category AS T4 ON T3.category_id = T4.category_id WHERE T1.first_name = 'Reese' AND T1.last_name = 'Kilmer'
Database: movie_3
Question: Give the total amount of rent for the movie Clockwork Paradice.
Evidence: 'Clockwork Paradice' is a title of a film
SQL: SELECT SUM(T1.amount) FROM payment AS T1 INNER JOIN rental AS T2 ON T1.rental_id = T2.rental_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.title = 'CLOCKWORK PARADICE'
Database: movie_3
Question: Find and list the full name of customers who rented more than five types of movies.
Evidence: full name refers to first_name, last_name; types of movies means category of movies; 
rented more than five types of movies refers to COUNT(film_category) > 5
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 INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id INNER JOIN film_category AS T5 ON T4.film_id = T5.film_id GROUP BY T1.first_name, T1.last_name ) AS T WHERE T.num > 5
Database: movie_3
Question: What is the average number of actors acted in comedy movies?
Evidence: comedy is the name of a category; average number of actors refers to AVG(actor_id)
SQL: SELECT AVG(T1.actor_id) FROM film_actor 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 actor AS T4 ON T4.actor_id = T1.actor_id WHERE T3.name = 'comedy'
Database: movie_3
Question: In children's movies, which was rented the most?
Evidence: children is the name of the category; rented the most refers to MAX(COUNT(title))
SQL: SELECT T.title FROM ( SELECT T4.title, COUNT(T4.title) AS num 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 INNER JOIN film_category AS T5 ON T4.film_id = T5.film_id INNER JOIN category AS T6 ON T5.category_id = T6.category_id WHERE T6.name = 'Children' GROUP BY T4.title ) AS T ORDER BY T.num DESC LIMIT 1
Database: movie_3
Question: Calculate the percentage of customers who paid more than the average rent amount in store 1.
Evidence: store 1 refers to store_id = 1; average rent amount refers to AVG(amount); calculation = DIVIDE(amount > AVG(amount), COUNT(customer_id)) * 100
SQL: SELECT CAST(( SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN payment AS T2 ON T1.customer_id = T2.customer_id WHERE T2.amount > ( SELECT AVG(amount) FROM payment ) ) AS REAL) * 100 / ( SELECT COUNT(customer_id) FROM customer )
Database: movie_3
Question: Find and list the full name of customers who rented more family movies than Sci-Fi movies.
Evidence: full name refers to first_name, last_name; 'family' AND 'Sci-Fi' are names of the category; customers who rented more family movies than Sci-Fi movies refers to count(name = 'Family') > count(name = 'Sci-Fi')
SQL: SELECT DISTINCT IIF(SUM(IIF(T5.name = 'Family', 1, 0)) - SUM(IIF(T5.name = 'Sci-Fi', 1, 0)) > 0, T1.first_name, 0) 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_category AS T4 ON T4.film_id = T3.film_id INNER JOIN category AS T5 ON T4.category_id = T5.category_id GROUP BY T1.customer_id
Database: movie_3
Question: Indicate the title of all the films rated as 'Adults Only'.
Evidence: 'Adults Only' refers to rating = 'NC-17'
SQL: SELECT title FROM film WHERE rating = 'NC-17'
Database: movie_3
Question: How many actors with the surname Kilmer are there?
Evidence: surname means last_name;
SQL: SELECT COUNT(actor_id) FROM actor WHERE last_name = 'Kilmer'
Database: movie_3
Question: How many movies have a length longer than 100?
Evidence: length longer than 100 refers to length > 100
SQL: SELECT COUNT(film_id) FROM film WHERE length > 100
Database: movie_3
Question: How many payments were made throughout the month of August 2005?
Evidence: payments made refers to amount; throughout the month of August 2005 refers to payment_date like '2005-08%'
SQL: SELECT SUM(amount) FROM payment WHERE payment_date LIKE '2005-08%'
Database: movie_3
Question: To which country does the address '1386 Nakhon Sawan Boulevard' belong?
SQL: SELECT T1.country FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id INNER JOIN address AS T3 ON T2.city_id = T3.city_id WHERE T3.address = '1386 Nakhon Sawan Boulevard'
Database: movie_3
Question: What language was the most used in movies released in 2006?
Evidence: released in 2006 refers to release_year = 2006; the most used language refers to MAX(COUNT(language_id))
SQL: SELECT T.language_id FROM ( SELECT T1.language_id, COUNT(T1.language_id) AS num FROM film AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE STRFTIME('%Y',T1.release_year) = '2006' GROUP BY T1.language_id ) AS T ORDER BY T.num DESC LIMIT 1
Database: movie_3
Question: Indicate the title of all the films that are in the Classics category.
Evidence: 'classics' is the name of category
SQL: SELECT T2.title FROM film_category AS T1 INNER JOIN film AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T1.category_id = T3.category_id WHERE T3.name = 'Classics'
Database: movie_3
Question: How many rentals did Ella Oliver hire in June 2016?
Evidence: 'Ella Oliver' is a full name of a customer; full name refers to first_name, last_name; rental hired in June 2016 refers to rental_date BETWEEN '2005-06-01' AND '2005-06-30'
SQL: SELECT COUNT(T1.rental_id) FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'ELLA' AND T2.last_name = 'ELLA' AND date(T1.rental_date) BETWEEN '2005-06-01' AND '2005-06-30'
Database: movie_3
Question: How many different clients have rented materials from Jon Stephens?
Evidence: 'Jon Stephens' is a full name of a customer; full name refers to first_name, last_name;
SQL: SELECT COUNT(T1.customer_id) FROM rental AS T1 INNER JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Jon' AND T2.last_name = 'Stephens'
Database: movie_3
Question: What is the total amount paid for rentals made on July 29, 2005?
Evidence: July 29, 2005 refers to rental_date like '2005-07-29'
SQL: SELECT SUM(T2.amount) FROM rental AS T1 INNER JOIN payment AS T2 ON T1.rental_id = T2.rental_id WHERE date(T1.rental_date) = '2005-07-29%'
Database: movie_3
Question: What is the first name of the customers whose address is in the postal code that begins with 76?
Evidence: postal code that begins with 76 refers to postal_code like '76%'
SQL: SELECT T1.first_name FROM customer AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id WHERE SUBSTR(T2.postal_code, 1, 2) = '76'
Database: movie_3
Question: On what date was the rented material for the movie BLOOD ARGONAUTS returned?
Evidence: 'BLOOD ARGONAUTS' is a title of a film; date a movie was returned refers to return_date
SQL: SELECT T1.rental_date FROM rental AS T1 INNER JOIN inventory AS T2 ON T1.inventory_id = T2.inventory_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'BLOOD ARGONAUTS'
Database: movie_3
Question: What is the title of the films in which Cuba Allen acted?
Evidence: 'Cuba Allen' is a full name of an actor; full name refers to first_name, last_name
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 = 'Cuba' AND T1.last_name = 'Allen'
Database: movie_3
Question: How many actors acted in movies in the Music category?
Evidence: Music' is a name of a category
SQL: SELECT COUNT(T1.actor_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 film_category AS T4 ON T3.film_id = T4.film_id INNER JOIN category AS T5 ON T4.category_id = T5.category_id WHERE T5.name = 'Music'
Database: movie_3
Question: What is the full name of the actor who has acted the most times in comedy films?
Evidence: full name refers to first_name, last_name; 'comedy' is a name of a category;
SQL: SELECT T.first_name, T.last_name FROM ( SELECT T4.first_name, T4.last_name, COUNT(T2.actor_id) AS num FROM film_category AS T1 INNER JOIN film_actor AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T1.category_id = T3.category_id INNER JOIN actor AS T4 ON T2.actor_id = T4.actor_id WHERE T3.name = 'Comedy' GROUP BY T4.first_name, T4.last_name ) AS T ORDER BY T.num DESC LIMIT 1
Database: movie_3
Question: How many customers did not rent material at Mike's store?
Evidence: not at Mike's store refers to staff.first_name ! = 'Mike'
SQL: SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN store AS T2 ON T1.store_id = T2.store_id INNER JOIN staff AS T3 ON T2.manager_staff_id = T3.staff_id WHERE T3.first_name != 'Mike'
Database: movie_3
Question: Indicate the name of the actors of the films rated as 'Parents Strongly Precautioned' with the highest replacement cost.
Evidence: name refers to first_name, last_name; Parents Strongly Precautioned' refers to rating = 'PG-13'; 
highest replacement cost refers to MAX(replacement_cost)
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.rating = 'PG-13' ORDER BY T3.replacement_cost DESC LIMIT 1
Database: movie_3
Question: What is the name of the client who has the largest quantity of rented material without returning it?
Evidence: name refers to first_name, last_name; without returning a rented material refers to return_date is null
SQL: SELECT T.first_name FROM ( SELECT T2.first_name, COUNT(T1.rental_date) AS num FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.first_name ) AS T ORDER BY T.num DESC LIMIT 1
Database: movie_3
Question: How many customers live in the city of Miyakonojo?
SQL: SELECT COUNT(T3.customer_id) FROM city AS T1 INNER JOIN address AS T2 ON T1.city_id = T2.city_id INNER JOIN customer AS T3 ON T2.address_id = T3.address_id WHERE T1.city = 'Miyakonojo'
Database: movie_3
Question: How many non-active clients have not returned the rented material?
Evidence: non-active clients refers to active = 0; not returning a rented material refers to rental_date is null
SQL: SELECT COUNT(T2.customer_id) FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.active = 0
Database: movie_3
Question: What is the title of the animated films that have the shortest length?
Evidence: animated film means animation; animation is a name of a 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 ORDER BY T1.length LIMIT 1
Database: movie_3
Question: In which country is the store where Hector Poinexter rents equipment located?
Evidence: 'Hector Poinexter' is a full name of a customer; full name refers to first_name, last_name;
SQL: SELECT T5.country FROM customer AS T1 INNER JOIN store AS T2 ON T1.store_id = T2.store_id INNER JOIN address AS T3 ON T2.address_id = T3.address_id INNER JOIN city AS T4 ON T3.city_id = T4.city_id INNER JOIN country AS T5 ON T4.country_id = T5.country_id WHERE T1.first_name = 'HECTOR' AND T1.last_name = 'POINDEXTER'
Database: movie_3
Question: What is the average rental payment in Horror movies?
Evidence: 'Horror' is a name of a category; average rental payment refers to AVG(amount)
SQL: SELECT AVG(T5.amount) FROM category AS T1 INNER JOIN film_category AS T2 ON T1.category_id = T2.category_id INNER JOIN inventory AS T3 ON T2.film_id = T3.film_id INNER JOIN rental AS T4 ON T3.inventory_id = T4.inventory_id INNER JOIN payment AS T5 ON T4.rental_id = T5.rental_id WHERE T1.name = 'Horror'
Database: movie_3
Question: What is the average amount of rent that Christy Vargas paid?
Evidence: 'Christy Vargas' is a full name of a customer; full name refers to first_name, last_name; average amount of rent refers to AVG(amount)
SQL: SELECT AVG(T2.amount) FROM customer AS T1 INNER JOIN payment AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'CHRISTY' AND T1.Last_name = 'VARGAS'
Database: movie_3
Question: What percentage of films with a length of less than 100 belong to the Drama category?
Evidence: Drama' is a name of a category; calculation = DIVIDE(SUM(length < 100 AND name = 'Drama'), COUNT(film_id)) * 100
SQL: SELECT CAST(SUM(IIF(T2.length < 100 AND T3.name = 'Drama', 1, 0)) AS REAL) * 100 / COUNT(T1.film_id) FROM film_category AS T1 INNER JOIN film AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T1.category_id = T3.category_id
Database: movie_3
Question: What are the actors that have the same forename as Johnny? Please include in your answer the full names of these actors.
Evidence: forename means first_name; full name refers to first_name, last_name
SQL: SELECT first_name, last_name FROM actor WHERE first_name = 'Johnny'
Database: movie_3
Question: What are the address numbers that are located in Gansu district?
Evidence: address numbers refers to address_id;
SQL: SELECT address_id FROM address WHERE district = 'Gansu'
Database: movie_3
Question: Please list three types of film along with their IDs and the latest update.
Evidence: types of film refers to the name of a category; IDs refers to category_id; latest update refers to last_update.
SQL: SELECT DISTINCT name, category_id, last_update FROM category LIMIT 3
Database: movie_3
Question: Please list the full names of any three inactive customers.
Evidence: full name refers to first_name, last_name; inactive customers refers to active = 0
SQL: SELECT first_name, last_name FROM customer WHERE active = 0 LIMIT 3
Database: movie_3
Question: What is the rental price per day for Airplane Sierra?
Evidence: rental price per day refers to DIVIDE(rental_price, rental_duration); 'Airplane Sierra' is a title of a film
SQL: SELECT rental_rate / rental_duration AS result FROM film WHERE title = 'AIRPLANE SIERRA'
Database: movie_3
Question: Where is store number 2 located?
Evidence: store number 2 refers to store_id = 2; where is a store located 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 city does the address 1623 Kingstown Drive belong to?
SQL: SELECT T1.city FROM city AS T1 INNER JOIN address AS T2 ON T2.city_id = T1.city_id WHERE T2.address = '1623 Kingstown Drive'
Database: movie_3
Question: Please name three cities that belong to Algeria.
Evidence: Algeria is a country
SQL: SELECT T2.city FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id WHERE T1.country = 'Algeria'
Database: movie_3
Question: What is the category of the film Agent Truman?
Evidence: 'Agent Truman' is a title of a 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 = 'AGENT TRUMAN'
Database: movie_3
Question: Please list the titles of any three action films.
Evidence: action is a 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 = 'Action' LIMIT 3
Database: movie_3
Question: What is the difference between the number of children's films and action films?
Evidence: 'children' AND 'action' are names of a category; Calculation = SUBTRACT(AVG('children'), AVG('action'))
SQL: SELECT SUM(IIF(T2.name = 'Children', 1, 0)) - SUM(IIF(T2.name = 'Action', 1, 0)) AS diff FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id
Database: movie_3
Question: Which district does Maria Miller live in?
Evidence: 'Maria Miller' is a name of a customer; full name refers to first_name, last_name
SQL: SELECT T2.district FROM customer AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Maria' AND T1.last_name = 'Miller'
Database: movie_3
Question: Who is the customer that is active and lives at 1795 Santiago de Compostela Way, Texas?
Evidence: active refers to active = 1; '1795 Santiago de Compostela Way' is an address; Texas is a district; who refers to first_name, last_name
SQL: SELECT T1.first_name, T1.last_name FROM customer AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T2.address = '1795 Santiago de Compostela Way' AND T1.active = 1
Database: movie_3
Question: How many English films have a duration of over 50 minutes and the cost of replacement are under 10.99?
Evidence: English is a name of a language; duration of over 50 minutes refers to length > 50; cost of replacement are under 10.99 refers to replacement_cost < 10.99
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' AND T1.length > 50 AND T1.replacement_cost < 10.99
Database: movie_3
Question: Who are the actors that act in the ACADEMY DINOSAUR film?
Evidence: Who are the actors refers to full name; full name refers to first_name, last_name; 'ACADEMY DINOSAUR' is a title of a 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: Please list any two films that Penelope Guiness acted in.
Evidence: film refers to title of the film; 'Penelope Guiness' is a full name of an actor; full name refers to first_name, last_name
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' LIMIT 2
Database: movie_3
Question: What is the percentage of documentary films?
Evidence: documentary' is a name of a category; calculation = DIVIDE(SUM(name = 'Documentary'), COUNT(film_id)) * 100
SQL: SELECT CAST(SUM(IIF(T2.name = 'Documentary', 1, 0)) AS REAL) * 100 / COUNT(T1.film_id) FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id
Database: movie_3
Question: How many films in English are for adults only?
Evidence: English is a name of a language; for adults only refers to rating = 'NC-17'
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' AND T1.rating = 'NC-17'
Database: movie_3
Question: Which film has the longest duration?
Evidence: film refers to the title; the longest duration refers to MAX(length)
SQL: SELECT title FROM film WHERE length = ( SELECT MAX(length) FROM film )
Database: movie_3
Question: How many of the actors are named "Dan"?
Evidence: 'Dan' is a first_name of an actor
SQL: SELECT COUNT(actor_id) FROM actor WHERE first_name = 'Dan'
Database: movie_3
Question: What is the most common first name among the customers?
Evidence: the most common first name refers to MAX(COUNT(first_name))
SQL: SELECT first_name FROM customer GROUP BY first_name ORDER BY COUNT(first_name) DESC LIMIT 1