Chinastark/bird_dataset huggingface dataset:
Database: movie_3
Question: What is the full name of the customer who rented movies for 7 consecutive days?
Evidence: rented for 7 consecutive days refers to Subtract(return_date, rental_date) = 7; full name refers to first_name, last_name
SQL: SELECT T1.first_name, T1.last_name FROM customer AS T1 INNER JOIN ( SELECT customer_id, COUNT(*) AS num_days FROM ( SELECT *, date(days, '-' || rn || ' day') AS results FROM ( SELECT customer_id, days, row_number() OVER (PARTITION BY customer_id ORDER BY days) AS rn FROM ( SELECT DISTINCT customer_id, date(rental_date) AS days FROM rental ) ) ) GROUP BY customer_id, results HAVING num_days = 7 ) AS T2 ON T1.customer_id = T2.customer_id
Database: movie_3
Question: How many films are categorized as 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: What is the name of the most rented movie?
Evidence: most rented movie 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: What is the most common special features of science-fiction movies?
Evidence: "science fiction" is the name of category; most common special features refers to Max(frequency(special_features))
SQL: SELECT T1.special_features 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 = 'sci-fi' ORDER BY T1.special_features DESC LIMIT 1
Database: movie_3
Question: What is the full name of the actor who starred in most movies?
Evidence: full name refers to first_name, last_name; actor who starred in the most movies refers to actor_id where 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: Among the films with a rental duration of 7 days, how many are comedies?
Evidence: rental duration of 7 refers to rental_duration = 7; comedies refers to name = 'Comedy'
SQL: SELECT 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 WHERE T1.rental_duration = 7 AND T3.name = 'Comedy'
Database: movie_3
Question: Who is the staff manager of the store with the most non-active customers?
Evidence: most non-active customer refers to Max(Count(active = 0))
SQL: SELECT T.first_name, T.last_name FROM ( SELECT T3.first_name, T3.last_name, COUNT(T1.customer_id) AS num FROM customer AS T1 INNER JOIN store AS T2 ON T1.store_id = T2.store_id INNER JOIN staff AS T3 ON T2.store_id = T3.store_id WHERE T1.active = 0 GROUP BY T3.first_name, T3.last_name ) AS T ORDER BY T.num DESC LIMIT 1
Database: movie_3
Question: What is the rental price per day of the most expensive children's film?
Evidence: children's film refers to name = 'Children'; average price per day of most expensive film = Max(Divide(rental_rate, rental_duration))
SQL: SELECT T1.rental_rate 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 = 'Children' ORDER BY T1.rental_rate / T1.rental_duration DESC LIMIT 1
Database: movie_3
Question: What is the complete address of store id 1?
Evidence: complete address refers to address, address2, district
SQL: SELECT T3.address, T3.address2, T3.district 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 INNER JOIN store AS T4 ON T3.address_id = T4.address_id WHERE T4.store_id = 1
Database: movie_3
Question: How many customers are from the city of Lethbridge?
Evidence: customer refers to customer_id
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 = 'Lethbridge'
Database: movie_3
Question: How many cities are there in the United States?
Evidence: "United States" is the country
SQL: SELECT COUNT(T2.city) FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id WHERE T1.country = 'United States'
Database: movie_3
Question: List the names of the customers from India.
Evidence: "India" is the country; name refers to first_name, last_name
SQL: SELECT T4.first_name, T4.last_name 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 INNER JOIN customer AS T4 ON T3.address_id = T4.address_id WHERE T1.country = 'India'
Database: movie_3
Question: Among the classic movies, how many movies have a rental rate of less than 1?
Evidence: classic movie refers to name = 'Classics'; rental rate of less than 1 refers to rental_rate < 1; movie refers to 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 INNER JOIN film AS T3 ON T1.film_id = T3.film_id WHERE T3.rental_rate < 1 AND T2.name = 'Classics'
Database: movie_3
Question: What is the full name of the customer who rented the highest number of movies of all time?
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 T2.first_name, T2.last_name, COUNT(T1.rental_id) AS num FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.first_name, T2.last_name ) AS T ORDER BY T.num DESC LIMIT 1
Database: movie_3
Question: How many times was "Blanket Beverly" rented?
Evidence: "BLANKET BEVERLY" is the title of film; rented times refers to count(rental_id)
SQL: SELECT COUNT(T3.rental_id) 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 WHERE T1.title = 'Blanket Beverly'
Database: movie_3
Question: What is the full name of the actor who has the highest number of restricted films?
Evidence: restricted refers to rating = 'R'; highest number of film refers to Max(Count(film_id)); full name refers to first_name, last_name
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 AS T3 ON T2.film_id = T3.film_id WHERE T3.rating = 'R' GROUP BY T1.first_name, T1.last_name ) AS T ORDER BY T.num DESC LIMIT 1
Database: movie_3
Question: Who are the top 5 actors with the highest number of films? List their full names and calculate the average number of films for each of the actors.
Evidence: actors with highest number of films refers to actor_id with Max(Count(film_id)); full name refers to first_name, last_name; average number of film = Divide (Count(film_id), 5)
SQL: SELECT T.first_name, T.last_name, num 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 AS T3 ON T2.film_id = T3.film_id GROUP BY T1.first_name, T1.last_name ) AS T ORDER BY T.num DESC LIMIT 5
Database: movie_3
Question: List down the films titles with the lowest replacement cost under the general audiences rating.
Evidence: lowest replacement cost refers to Min(replacement_cost); under general audience rating refers to rating = G
SQL: SELECT title FROM film WHERE replacement_cost = ( SELECT MIN(replacement_cost) FROM film )
Database: movie_3
Question: Among the films with the longest duration, list any five title with their descriptions and special features.
Evidence: longest duration of film refers to Max(length)
SQL: SELECT title, description, special_features FROM film WHERE length = ( SELECT MAX(length) FROM film ) LIMIT 5
Database: movie_3
Question: How many films rented on 26th May, 2005 were returned on 30th May, 2005?
Evidence: rented on 26th May 2005 refers to rental_date = '2005-05-26'; return on 30th May, 2005 refers to return_date = '2005-05-30'; number of rented film refers to Count (rental_id)
SQL: SELECT COUNT(DISTINCT rental_id) FROM rental WHERE date(rental_date) BETWEEN '2005-05-26' AND '2005-05-30'
Database: movie_3
Question: Calculate the average payment amount per customer.
Evidence: average payment refers to AVG(amount)
SQL: SELECT AVG(amount) FROM payment GROUP BY customer_id
Database: movie_3
Question: What is the name and email of the staff in store ID 2?
Evidence: name refers to first_name, last_name
SQL: SELECT first_name, last_name, email FROM staff WHERE store_id = 2
Database: movie_3
Question: How many percent of customers were inactive?
Evidence: inactive refers to active = 0; percent = Divide (Count (customer_id where active = 0), Count(customer_id)) * 100
SQL: SELECT CAST(SUM(IIF(active = 0, 1, 0)) AS REAL) * 100 / COUNT(customer_id) FROM customer
Database: movie_3
Question: What is the description and film title of ID 996?
Evidence: ID 996 refers to film_id = 996
SQL: SELECT description, title FROM film_text WHERE film_id = 996
Database: movie_3
Question: Calculate customers' total payment amount in August, 2005.
Evidence: in August 2005 refers to payment_date like '2005-08%'; total payment amount refers to Sum(amount)
SQL: SELECT SUM(amount) FROM payment WHERE SUBSTR(payment_date, 1, 7) = '2005-08'
Database: movie_3
Question: List down the film titles performed by Emily Dee.
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 = 'Emily' AND T1.last_name = 'Dee'
Database: movie_3
Question: List down the actors' full names who performed in "CHOCOLATE DUCK" film.
Evidence: "CHOCOLATE DUCK" is the title of film; full name refers to first_name, last_name
SQL: SELECT T3.first_name, T3.last_name 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 T2.title = 'CHOCOLATE DUCK'
Database: movie_3
Question: How many films in the horror category were included in PG-13-rated?
Evidence: "Horror" is the name of category; PG-13 rated refers to rating = 'PG-13'
SQL: SELECT 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 WHERE T3.name = 'Horror' AND T1.rating = 'PG-13'
Database: movie_3
Question: Distinguish the films performed by Judy Dean according to category.
Evidence: films performed refers to film
SQL: SELECT T5.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 INNER JOIN film_category AS T4 ON T2.film_id = T4.film_id INNER JOIN category AS T5 ON T4.category_id = T5.category_id WHERE T1.first_name = 'Judy' AND T1.last_name = 'Dean'
Database: movie_3
Question: Write down any five film names under the documentary category.
Evidence: "Documentary" is the name of category; film name refers to title
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 = 'Documentary' LIMIT 5
Database: movie_3
Question: Mention the language of Untouchables Sunrise film and calculate its rental cost per day.
Evidence: "UNTOUCHABLES SUNRISE" is the title of film; language refers to name; rental cost per day = Divide (rental_cost, rental_duration)
SQL: SELECT T2.name, T1.replacement_cost / T1.rental_duration AS cost FROM film AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'UNTOUCHABLES SUNRISE'
Database: movie_3
Question: List the films' titles which were rented on 24th May,2005.
Evidence: rented on 24th May 2005 refers to rental_date = '2005-05-24%'
SQL: SELECT T1.title 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 WHERE SUBSTR(T3.rental_date, 1, 10) = '2005-05-24'
Database: movie_3
Question: List the films' titles which were rented by Brian Wyman in July, 2005.
Evidence: rented in July 2005 refers to year (rental_date) = 2005 and month (rental_date) = 7
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 = 'BRIAN' AND T1.last_name = 'WYMAN' AND STRFTIME('%Y', T2.rental_date) = '2005' AND STRFTIME('%m',T2.rental_date) = '7'
Database: movie_3
Question: Write down the inventories' IDs and actors' names of "STREETCAR INTENTIONS".
Evidence: "STREETCAR INTENTIONS" is the title of film; actor's names refers to first_name, last_name
SQL: SELECT T4.inventory_id, 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 INNER JOIN inventory AS T4 ON T2.film_id = T4.film_id WHERE T3.title = 'STREETCAR INTENTIONS'
Database: movie_3
Question: Among the films rented by Natalie Meyer, describe the titles and categories of the films which were rented in February 2006.
Evidence: category refers to name; rented in February 2006 refers to year(rental_date) = 2006 and month (rental_rate) = 2
SQL: SELECT T3.title, T2.name 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 INNER JOIN inventory AS T4 ON T3.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 = 'Natalie' AND T5.last_name = 'Meyer' AND STRFTIME('%Y',T3.rental_rate) = '2006' AND STRFTIME('%m',T3.rental_rate) = '2'
Database: movie_3
Question: How many rental IDs belong to Eleanor Hunt?
Evidence: 'Eleanor Hunt' is the full name of a customer; full name refers to first_name, last_name
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 = 'Eleanor' AND T2.last_name = 'Hunt'
Database: movie_3
Question: Describe the full names and cities of the customers who rented "DREAM PICKUP".
Evidence: full name refers to first_name, last_name; 'DREAM PICKUP' is a title of film
SQL: SELECT T4.first_name, T4.last_name, T6.city 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 INNER JOIN customer AS T4 ON T3.customer_id = T4.customer_id INNER JOIN address AS T5 ON T4.address_id = T5.address_id INNER JOIN city AS T6 ON T5.city_id = T6.city_id WHERE T1.title = 'DREAM PICKUP'
Database: movie_3
Question: Calculate how many percent of customers were located in India.
Evidence: 'India' is a country; calculation = DIVIDE(SUM(country = 'India'), COUNT(customer_id)) * 100
SQL: SELECT CAST(SUM(IIF(T1.country = 'India', 1, 0)) AS REAL) * 100 / COUNT(T4.customer_id) 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 INNER JOIN customer AS T4 ON T3.address_id = T4.address_id
Database: movie_3
Question: How much percentage of the film did Mary Keitel perform more than Angela Witherspoon?
Evidence: 'Mary Keitel' AND 'Angela Witherspoon' are full name of actors; full name refers to FirstName, LastName; calculation = DIVIDE(SUBTRACT(SUM('Mary Keitel'), SUM('Angela Witherspoon')), SUM('Angela Witherspoon')) * 100
SQL: SELECT CAST((SUM(IIF(T1.first_name = 'ANGELA' AND T1.last_name = 'WITHERSPOON', 1, 0)) - SUM(IIF(T1.first_name = 'MARY' AND T1.last_name = 'KEITEL', 1, 0))) AS REAL) * 100 / SUM(IIF(T1.first_name = 'MARY' AND T1.last_name = 'KEITEL', 1, 0)) FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id
Database: movie_3
Question: Provide the email, address, city, and country of the customer Lillie Kim.
Evidence: 'Lillie Kim' is the full name of a customer; full name refers to first_name, last_name
SQL: SELECT T1.email, T2.address, T3.city, T4.country 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 WHERE T1.first_name = 'Lillie' AND T1.last_name = 'Kim'
Database: movie_3
Question: Provide any 5 customers' full names who have rented from Mike Hillyer.
Evidence: full name refers to first_name, last_name; 'Mike Hillyer' is a full name of a staff;
SQL: SELECT T3.first_name, T3.last_name FROM staff AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id INNER JOIN customer AS T3 ON T2.address_id = T3.address_id WHERE T1.first_name = 'Mike' AND T1.last_name = 'Hillyer' LIMIT 5
Database: movie_3
Question: Calculate the total payment amount by Diane Collins.
Evidence: 'Diane Collins' is a full name of a customer; full name refers to first_name, last_name
SQL: SELECT SUM(T2.amount) FROM customer AS T1 INNER JOIN payment AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'Diane' AND T1.last_name = 'Collins'
Database: movie_3
Question: Provide the full names and emails of customers whose payments were greater than 70% of the average.
Evidence: full name refers to first_name, last_name; average payment refers to AVG(amount); payments were greater than 70% of the average refers to amount > (AVG(amount) MULTIPLY 0.7)
SQL: SELECT DISTINCT T2.first_name, T2.last_name, T2.email FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id INNER JOIN address AS T3 ON T2.address_id = T3.address_id WHERE T1.amount > ( SELECT AVG(amount) FROM payment ) * 0.7
Database: movie_3
Question: How many films have a rental rate of 0.99?
SQL: SELECT COUNT(film_id) FROM film WHERE rental_rate = 0.99
Database: movie_3
Question: Among the customers with customer ID of 100 and below, how many of them have Thomas as their last name?
Evidence: customer ID of 100 and below refers to customer_id < 100
SQL: SELECT COUNT(customer_id) FROM customer WHERE last_name = 'Thomas' AND customer_id < 100
Database: movie_3
Question: List the actor's last name that starred the film with the description of "A Thoughtful Drama of a Composer And a Feminist who must Meet a Secret Agent in The Canadian Rockies".
SQL: SELECT 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.description = 'A Thoughtful Drama of a Composer And a Feminist who must Meet a Secret Agent in The Canadian Rockies'
Database: movie_3
Question: Give the title of the film starred by Liza Bergman with the highest replacement cost.
Evidence: Liza Bergman' is a full name; full name refers to first_name, last_name; 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 = 'Liza' AND T1.last_name = 'Bergman' ORDER BY replacement_cost DESC LIMIT 1
Database: movie_3
Question: Among films with store ID of 2, list the title of films with the highest rental rate.
Evidence: highest rental rate refers to MAX(rental_rate)
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 ORDER BY rental_rate DESC LIMIT 1
Database: movie_3
Question: Among the films starred by Angelina Astaire, what is the title of the film with a replacement cost of 27.99?
Evidence: Angelina Astaire' 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 = 'Angelina' AND T1.last_name = 'Astaire' AND T3.replacement_cost = 27.99
Database: movie_3
Question: List the inventory ID of the film titled "African Egg".
Evidence: 'African Egg' is a title of a film
SQL: SELECT T2.inventory_id FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T1.title = 'African Egg'
Database: movie_3
Question: In films with a length duration of 113 minutes, how many of the films are starred by Kirk Jovovich?
Evidence: length duration of 113 minutes refers to length = 113; 'Kirk Jovovich' is a full name of an actor; full name refers to first_name, last_name
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 WHERE T3.length = 113 AND T1.first_name = 'Kirk' AND T1.last_name = 'Jovovich'
Database: movie_3
Question: In the film with an inventory ID between 20 to 60, how many of the films have a G rating?
Evidence: G rating refers to rating = 'G'
SQL: SELECT COUNT(T1.film_id) FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T2.inventory_id BETWEEN 20 AND 60 AND T1.rating = 'G'
Database: movie_3
Question: Among films with a rental rate of 4.99, what is the total number of films starred by Bob Fawcett?
Evidence: Bob Fawcett' is a full name of an actor; full name refers to first_name, last_name
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 WHERE T3.rental_rate = 4.99 AND T1.first_name = 'Bob' AND T1.last_name = 'Fawcett'
Database: movie_3
Question: What is the inventory ID of the films starred by Russell Close with a duration between 110 to 150 minutes?
Evidence: 'Russell Close' is a full name of an actor; full name refers to first_name, last_name; duration between 110 to 150 minutes refers to length BETWEEN 110 AND 150
SQL: SELECT T4.inventory_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 inventory AS T4 ON T3.film_id = T4.film_id WHERE T3.length BETWEEN 110 AND 150 AND T1.first_name = 'Russell' AND T1.last_name = 'Close'
Database: movie_3
Question: What is the store and inventory ID of the film with the longest duration?
Evidence: the longest duration refers to MAX(length)
SQL: SELECT T2.store_id, T2.inventory_id FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id ORDER BY T1.length DESC LIMIT 1
Database: movie_3
Question: List the titles of the films starred by Elvis Marx.
Evidence: 'Elvis Marx' is a full name of a film; 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 T3.length BETWEEN 110 AND 150 AND T1.first_name = 'Russell' AND T1.last_name = 'Close'
Database: movie_3
Question: In films with rental rate of 4.99, list down the inventory ID of the films starred by Lucille Dee.
Evidence: 'Lucille Dee' is a full name of an actor; full name refers to first_name, last_name
SQL: SELECT T4.inventory_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 inventory AS T4 ON T3.film_id = T4.film_id WHERE T1.first_name = 'Lucille' AND T1.last_name = 'Dee' AND T3.rental_rate = 4.99
Database: movie_3
Question: List the store ID of the films with a rental rate greater than the 60% of average rental rate of all listed films.
Evidence: average rental rate of all listed films refers to AVG(rental_rate); rental rate greater than the 60% of average rental rate refers to rental_rate > (AVG(rental_rate)) MULTIPLY 0.6
SQL: SELECT T2.store_id FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T1.rental_rate > ( SELECT AVG(T1.rental_rate) * 0.6 FROM film AS T1 )