db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
movie_3
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
Question: please list any two films that penelope guiness acted in. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city ->...
please list any two films that penelope guiness acted in.
movie_3
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
Question: what is the percentage of documentary films? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, cit...
what is the percentage of documentary films?
movie_3
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'
Question: how many films in english are for adults only? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, c...
how many films in english are for adults only?
movie_3
select title from film where length = ( select max(length) from film )
Question: which film has the longest duration? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city, count...
which film has the longest duration?
movie_3
select count(actor_id) from actor where first_name = 'dan'
Question: how many of the actors are named 'dan'? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city, co...
how many of the actors are named 'dan'?
movie_3
select first_name from customer group by first_name order by count(first_name) desc limit 1
Question: what is the most common first name among the customers? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> c...
what is the most common first name among the customers?
movie_3
select rating from film where special_features like '%behind the scenes%'
Question: what are the ratings of the film featuring behind the scenes? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. cit...
what are the ratings of the film featuring behind the scenes?
movie_3
select count(rental_id) from rental group by customer_id order by count(rental_id) desc limit 1
Question: what is the largest number of films rented per customer? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> ...
what is the largest number of films rented per customer?
movie_3
select title from film_text where description like '%lacklusture%'
Question: list all the films with the word 'lacklusture' in their description. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_upda...
list all the films with the word 'lacklusture' in their description.
movie_3
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 = 'francis' and t1.last_name = 'sikes'
Question: how many films did a customer named francis sikes rent? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> c...
how many films did a customer named francis sikes rent?
movie_3
select t.first_name, t.last_name from ( select t3.first_name, t3.last_name, count(t1.film_id) as num from inventory 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 group by t3.first_name, t3.last_name ) as t order by t.num desc limit 1
Question: who is the manager of the store with the largest collection of films? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_upd...
who is the manager of the store with the largest collection of films?
movie_3
select t2.address from customer as t1 inner join address as t2 on t1.address_id = t2.address_id where t1.active = 0
Question: what are the addresses of the inactive customers? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id...
what are the addresses of the inactive customers?
movie_3
select t.name from ( select t2.name, count(t2.name) 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
Question: which category is the most common? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city, country...
which category is the most common?
movie_3
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 = 'jason trap'
Question: provide the cast for the film 'jason trap'. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city...
provide the cast for the film 'jason trap'.
movie_3
select t.first_name, t.last_name from ( select t1.first_name, t1.last_name, sum(t2.amount) as num from customer as t1 inner join payment 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
Question: who is the customer with the largest payment for rental films? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. ci...
who is the customer with the largest payment for rental films?
movie_3
select t.title from ( select t3.title, count(t2.inventory_id) as num 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 group by t3.title ) as t order by t.num desc limit 5
Question: list the top 5 most-rented films. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city, country_...
list the top 5 most-rented films.
movie_3
select t1.country from country as t1 inner join city as t2 on t1.country_id = t2.country_id where t2.city = 'sasebo'
Question: which country does sasebo belong to? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city, count...
which country does sasebo belong to?
movie_3
select t2.address from store as t1 inner join address as t2 on t1.address_id = t2.address_id
Question: what are the addresses for the stores? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city, cou...
what are the addresses for the stores?
movie_3
select t3.title as per 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 = 'animation'
Question: list all the animation titles. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city, country_id,...
list all the animation titles.
movie_3
select t.city from ( select t1.city, count(t3.customer_id) as num from city as t1 inner join address as t2 on t2.city_id = t1.city_id inner join customer as t3 on t2.address_id = t3.address_id group by t1.city ) as t order by t.num desc limit 1
Question: what is the city with the most customers? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city, ...
what is the city with the most customers?
movie_3
select t.first_name, t.last_name from ( select t2.first_name, t2.last_name, sum(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
Question: which actor acted in the most films? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city, count...
which actor acted in the most films?
movie_3
select cast(sum(iif(t2.name = 'horror', 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 inner join film as t3 on t1.film_id = t3.film_id
Question: what percentage of films are horror films? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city,...
what percentage of films are horror films?
movie_3
select first_name, last_name from actor where actor_id = 5
Question: please indicate the full name of actor id 5. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, cit...
please indicate the full name of actor id 5.
movie_3
select count(film_id) from film_category where category_id = 11
Question: how many id movies have category id 11? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city, co...
how many id movies have category id 11?
movie_3
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 t3.category_id = t2.category_id where t1.title = 'baby hall'
Question: which category does baby hall film belong to? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, ci...
which category does baby hall film belong to?
movie_3
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 t3.film_id = t2.film_id order by t3.rental_rate desc limit 1
Question: give the full name of the actor with the highest rental rate. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. cit...
give the full name of the actor with the highest rental rate.
movie_3
select t3.description from actor as t1 inner join film_actor as t2 on t1.actor_id = t2.actor_id inner join film as t3 on t3.film_id = t2.film_id where t1.first_name = 'johnny' and t1.last_name = 'davis'
Question: please give the description of the movie starring jennifer davis. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update....
please give the description of the movie starring jennifer davis.
movie_3
select t2.first_name, t2.last_name from payment as t1 inner join customer as t2 on t1.customer_id = t2.customer_id where t1.amount > 10
Question: list the full names of customers who have paid more than 10$. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. cit...
list the full names of customers who have paid more than 10$.
movie_3
select t1.address from address as t1 inner join customer as t2 on t1.address_id = t2.address_id where t2.first_name = 'susan' and t1.postal_code = 77948
Question: please provide the address of the customer whose first name is susan with the postal code 77948. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> ...
please provide the address of the customer whose first name is susan with the postal code 77948.
movie_3
select count(t1.city_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 = 'abu dhabi'
Question: how many customers have an address in abu dhabi city? list those customer names. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, nam...
how many customers have an address in abu dhabi city? list those customer names.
movie_3
select t2.first_name, t2.last_name from address as t1 inner join customer as t2 on t1.address_id = t2.address_id where t1.address = '692 joliet street'
Question: please provide the full name of the customer at 692 joliet street. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update...
please provide the full name of the customer at 692 joliet street.
movie_3
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 t3.category_id = t2.category_id where t3.`name` = 'action' and t1.length > 120
Question: list movie titles with duration over 120 minutes that are in the action category. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, na...
list movie titles with duration over 120 minutes that are in the action category.
movie_3
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 t3.film_id = t2.film_id where t3.title = 'anonymous human'
Question: which actor acted in anonymous human? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city, coun...
which actor acted in anonymous human?
movie_3
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' order by t1.rental_rate limit 1
Question: which movie title has the lowest movie rental in the horror category? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_upd...
which movie title has the lowest movie rental in the horror category?
movie_3
select t1.description 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` = 'travel'
Question: list the descriptions of movies under the category travel. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -...
list the descriptions of movies under the category travel.
movie_3
select sum(t1.amount) from payment as t1 inner join customer as t2 on t1.customer_id = t2.customer_id inner join address as t3 on t3.address_id = t2.address_id where t3.district = 'nagasaki'
Question: calculate the total payment amount of customers in nagasaki district. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_upd...
calculate the total payment amount of customers in nagasaki district.
movie_3
select cast(sum(iif(t2.first_name = 'margaret' and t2.last_name = 'moore', t1.amount, 0)) as real) * 100 / sum(t1.amount) from payment as t1 inner join customer as t2 on t1.customer_id = t2.customer_id
Question: calculate the percentage of total payment of margaret moore customers. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_up...
calculate the percentage of total payment of margaret moore customers.
movie_3
select cast(sum(iif(t3.`name` = 'horror', 1, 0)) * 100 / count(t1.film_id) as real) from film as t1 inner join film_category as t2 on t1.film_id = t2.film_id inner join category as t3 on t3.category_id = t2.category_id where t1.length > 120
Question: calculate the percentage of movie titles with a screen length of more than 120 minutes that have a category of horror movies. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, pho...
calculate the percentage of movie titles with a screen length of more than 120 minutes that have a category of horror movies.
movie_3
select count(film_id) from film where release_year = 2006
Question: how many film titles were released in 2006? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city...
how many film titles were released in 2006?
movie_3
select title from film where film_id between 1 and 10
Question: list down film titles from id 1 to 10. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city, cou...
list down film titles from id 1 to 10.
movie_3
select film_id from film where rental_duration = ( select max(rental_duration) from film )
Question: list down all of the film ids with highest rental duration. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city ...
list down all of the film ids with highest rental duration.
movie_3
select title from film where rental_rate = ( select max(rental_rate) from film )
Question: which film titles have the most expensive rental rate? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> ci...
which film titles have the most expensive rental rate?
movie_3
select title from film where rating = 'g'
Question: list down all of the film titles that are rated for general audiences. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_up...
list down all of the film titles that are rated for general audiences.
movie_3
select t2.`name` from film as t1 inner join `language` as t2 on t1.language_id = t2.language_id where t1.title = 'chill luck'
Question: what is the language for film titled 'chill luck'? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_i...
what is the language for film titled 'chill luck'?
movie_3
select distinct t1.last_update from film as t1 inner join `language` as t2 on t1.language_id = t2.language_id where t2.`name` = 'english' and t1.release_year = 2006
Question: what are the last updated date for english film titles that were released in 2006? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, n...
what are the last updated date for english film titles that were released in 2006?
movie_3
select count(t1.film_id) from film as t1 inner join `language` as t2 on t1.language_id = t2.language_id where t2.`name` = 'italian' and t1.special_features = 'deleted scenes'
Question: how many italian film titles were special featured with deleted scenes? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_u...
how many italian film titles were special featured with deleted scenes?
movie_3
select count(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 = 'animation' and t1.rating = 'nc-17'
Question: how many animation film titles are rated for adults only? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city ->...
how many animation film titles are rated for adults only?
movie_3
select t1.description 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'
Question: list down all ratings of action film titles. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, cit...
list down all ratings of action film titles.
movie_3
select 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 t3.category_id = t2.category_id where t3.name = 'comedy'
Question: list down all film ids of comedy film titles. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, ci...
list down all film ids of comedy film titles.
movie_3
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 t3.category_id = t2.category_id where t3.name = 'documentary' order by t1.length desc limit 1
Question: state the documentary film titles with longest length. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> ci...
state the documentary film titles with longest length.
movie_3
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 t3.category_id = t2.category_id where t1.title = 'blade polish'
Question: what is the category of film titled 'blade polish'? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_...
what is the category of film titled 'blade polish'?
movie_3
select t2.rental_id from customer as t1 inner join rental as t2 on t1.customer_id = t2.customer_id where t1.first_name = 'mary' and t1.last_name = 'smith'
Question: what is mary smith's rental id? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city, country_id...
what is mary smith's rental id?
movie_3
select distinct t1.first_name, t1.last_name from customer as t1 inner join rental as t2 on t1.customer_id = t2.customer_id where t2.staff_id = 1
Question: list down all of the customers' first name who were attended by staff with id 1. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, nam...
list down all of the customers' first name who were attended by staff with id 1.
movie_3
select distinct t1.email from customer as t1 inner join rental as t2 on t1.customer_id = t2.customer_id where t2.staff_id = 2
Question: list down email address of customers who were attended by staff with id 2. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, las...
list down email address of customers who were attended by staff with id 2.
movie_3
select t2.actor_id from film as t1 inner join film_actor as t2 on t1.film_id = t2.film_id where t1.title = 'bound cheaper'
Question: list down the actor ids of film titled 'bound cheaper'. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> c...
list down the actor ids of film titled 'bound cheaper'.
movie_3
select t2.inventory_id from customer as t1 inner join rental as t2 on t1.customer_id = t2.customer_id where t1.first_name = 'karen' and t1.last_name = 'jackson'
Question: what is the inventory id of karen jackson? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city,...
what is the inventory id of karen jackson?
movie_3
select t1.title from film as t1 inner join film_actor as t2 on t1.film_id = t2.film_id inner join actor as t3 on t2.actor_id = t3.actor_id where t3.first_name = 'jane' and t3.last_name = 'jackman'
Question: list down all film titles starred by jane jackman. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_i...
list down all film titles starred by jane jackman.
movie_3
select t3.first_name, t3.last_name from film as t1 inner join film_actor as t2 on t1.film_id = t2.film_id inner join actor as t3 on t2.actor_id = t3.actor_id where t1.title = 'bird independence'
Question: who are the actors of film titled 'bird independence'? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> ci...
who are the actors of film titled 'bird independence'?
movie_3
select sum(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` = 'animation'
Question: calculate the total rental rate for animation film titles. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -...
calculate the total rental rate for animation film titles.
movie_3
select avg(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 t3.category_id = t2.category_id where t3.`name` = 'sci-fi'
Question: what is the average rental rate of sci-fi film titles? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> ci...
what is the average rental rate of sci-fi film titles?
movie_3
select cast(sum(iif(t3.name = 'horror', 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 inner join language as t4 on t2.language_id = t4.language_id where t4.name = 'english'
Question: what is the percentage of horror film titles in english film titles? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_upda...
what is the percentage of horror film titles in english film titles?
movie_3
select count(film_id) from film where rating = 'nc-17' and rental_duration < 4
Question: among the adult films, how many of them have a rental duration of fewer than 4 days? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id,...
among the adult films, how many of them have a rental duration of fewer than 4 days?
movie_3
select title from film where replacement_cost = 29.99 and rating = 'r' and length = 71
Question: what is the title of the restricted film, whose length is 71 minutes and whose replacement cost is $29.99? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. ca...
what is the title of the restricted film, whose length is 71 minutes and whose replacement cost is $29.99?
movie_3
select t2.email from rental as t1 inner join customer as t2 on t1.customer_id = t2.customer_id where t1.rental_date between '2005-5-25 07:37:47' and '2005-5-26 10:06:49' and t2.active = 1
Question: write down the email addresses of active customers who rented between 5/25/2005 at 7:37:47 pm and 5/26/2005 at 10:06:49 am. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone...
write down the email addresses of active customers who rented between 5/25/2005 at 7:37:47 pm and 5/26/2005 at 10:06:49 am.
movie_3
select sum(t3.amount) from rental as t1 inner join customer as t2 on t1.customer_id = t2.customer_id inner join payment as t3 on t1.rental_id = t3.rental_id where t2.first_name = 'sarah' and t2.last_name = 'lewis'
Question: compute the total payment made by sarah lewis for film rentals so far. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_up...
compute the total payment made by sarah lewis for film rentals so far.
movie_3
select count(t1.customer_id) from payment as t1 inner join customer as t2 on t1.customer_id = t2.customer_id where t1.payment_date between '2005-05-30 03:43:54' and '2005-07-31 10:08:29'
Question: from 5/30/2005 at 3:43:54 am to 7/31/2005 at 10:08:29 pm, how many times did susan wilson pay for film rentals? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_updat...
from 5/30/2005 at 3:43:54 am to 7/31/2005 at 10:08:29 pm, how many times did susan wilson pay for film rentals?
movie_3
select t2.first_name, t2.last_name from film_actor as t1 inner join actor as t2 on t1.actor_id = t2.actor_id inner join film as t3 on t1.film_id = t3.film_id where t3.title = 'alabama devil'
Question: tally the full names of actors in the film 'alabama devil.' | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city ...
tally the full names of actors in the film 'alabama devil.'
movie_3
select t3.title from film_actor as t1 inner join actor as t2 on t1.actor_id = t2.actor_id inner join film as t3 on t1.film_id = t3.film_id where t2.first_name = 'sandra' and t2.last_name = 'kilmer'
Question: tell me the title of the film in which sandra kilmer is one of the actors. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, las...
tell me the title of the film in which sandra kilmer is one of the actors.
movie_3
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 = 'documentary' and t1.rating = 'pg-13'
Question: how many documentary films are rated pg-13? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city...
how many documentary films are rated pg-13?
movie_3
select t1.title, t3.name, 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 t1.rental_duration * t1.rental_rate > 30
Question: give me the title and category name of films whose price per day is more than $30. please include their special features. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, ...
give me the title and category name of films whose price per day is more than $30. please include their special features.
movie_3
select t2.first_name, t2.last_name from film_actor as t1 inner join actor as t2 on t1.actor_id = t2.actor_id inner join film as t3 on t1.film_id = t3.film_id where t3.title = 'african egg'
Question: name the cast members of the movie 'african egg'. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id...
name the cast members of the movie 'african egg'.
movie_3
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 = 'maria' and t1.last_name = 'miller'
Question: identify the number of movies rented by maria miller. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> cit...
identify the number of movies rented by maria miller.
movie_3
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 = 'dorothy' and t1.last_name = 'taylor' order by t2.rental_date desc limit 1
Question: name the most recent movie rented by dorothy taylor. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city...
name the most recent movie rented by dorothy taylor.
movie_3
select count(t2.film_id) from category as t1 inner join film_category as t2 on t1.category_id = t2.category_id where t1.name = 'action'
Question: determine the number of action movies available for rent. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city ->...
determine the number of action movies available for rent.
movie_3
select t2.store_id, t1.address, t4.rental_rate from address as t1 inner join store as t2 on t1.address_id = t2.address_id inner join inventory as t3 on t2.store_id = t3.store_id inner join film as t4 on t3.film_id = t4.film_id where t4.title = 'wyoming storm'
Question: where can you rent the movie 'wyoming storm'? identify the address of the rental store and the rental rate. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. c...
where can you rent the movie 'wyoming storm'? identify the address of the rental store and the rental rate.
movie_3
select t2.rental_date - t2.return_date 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 = 'austin' and t4.title = 'destiny saturday'
Question: how long did austin cintron take to return the movie 'destiny saturday'? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_...
how long did austin cintron take to return the movie 'destiny saturday'?
movie_3
select count(t1.film_id) from film_actor as t1 inner join actor as t2 on t1.actor_id = t2.actor_id and t2.first_name = 'nick' and t2.last_name = 'stallone'
Question: identify the number of movies that starred nick stallone. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city ->...
identify the number of movies that starred nick stallone.
movie_3
select title from film where length = ( select min(length) from film ) order by rental_duration * rental_rate desc limit 1
Question: name the movie with the highest rental revenue among the shortest films. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_...
name the movie with the highest rental revenue among the shortest films.
movie_3
select sum(t1.amount) from payment as t1 inner join customer as t2 on t1.customer_id = t2.customer_id where t2.first_name = 'stephanie' and t2.last_name = 'mitchell' and substr(t1.payment_date, 1, 7) = '2005-06'
Question: calculate the total amount paid by stephanie mitchell for film rentals in june 2005. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id,...
calculate the total amount paid by stephanie mitchell for film rentals in june 2005.
movie_3
select avg(replacement_cost) from film where rental_rate = 4.99
Question: what is the average replacement cost for the movies with a rental rate of 4.99? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name...
what is the average replacement cost for the movies with a rental rate of 4.99?
movie_3
select avg(rental_rate) from film where rating = 'pg-13'
Question: what is the average rental rate for pg-13 rated movies? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> c...
what is the average rental rate for pg-13 rated movies?
movie_3
select cast(sum(case when active = 0 then 1 else 0 end) as real) * 100 / count(customer_id) from customer where store_id = 1
Question: indicate the percentage of inactive customers at store no.1. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city...
indicate the percentage of inactive customers at store no.1.
movie_3
select rental_duration from film where title = 'dirty ace'
Question: for how long can you rent the movie 'dirty ace'? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id,...
for how long can you rent the movie 'dirty ace'?
movie_3
select first_name, last_name from customer where email = 'sheila.wells@sakilacustomer.org'
Question: identify the full name of the customer, who has the following email address: sheila.wells@sakilacustomer.org. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update....
identify the full name of the customer, who has the following email address: sheila.wells@sakilacustomer.org.
movie_3
select title from film where length = ( select max(length) from film )
Question: provide the list of the longest movies. arrange these titles in alphabetical order. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, ...
provide the list of the longest movies. arrange these titles in alphabetical order.
movie_3
select count(distinct category_id) from category
Question: how many film categories are there? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city, countr...
how many film categories are there?
movie_3
select count(t2.rental_id) , cast(sum(iif(strftime('%m',t2.rental_date) = '7', 1, 0)) as real) * 100 / count(t2.rental_id) from customer as t1 inner join rental as t2 on t1.customer_id = t2.customer_id where t1.first_name = 'maria' and t1.last_name = 'miller' and strftime('%y',t2.rental_date) = '2005'
Question: how many titles did mary smith rent in 2005? determine the percentage of titles rented in june 2005. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category...
how many titles did mary smith rent in 2005? determine the percentage of titles rented in june 2005.
movie_3
select count(customer_id) from customer where active = 1
Question: how many customers are still active? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city, count...
how many customers are still active?
movie_3
select title from film where rating = 'pg-13'
Question: list all the films that are rated as pg-13. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city...
list all the films that are rated as pg-13.
movie_3
select t.title from ( select t1.title, count(t3.customer_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 where t1.rental_duration > 5 group by t1.title ) as t where t.num > 10
Question: list at least 10 films that the customers can rent for more than 5 days. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_...
list at least 10 films that the customers can rent for more than 5 days.
movie_3
select t1.city from city as t1 inner join country as t2 on t2.country_id = t1.country_id where country = 'united arab emirates'
Question: list all the cities that belong to united arab emirates. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> ...
list all the cities that belong to united arab emirates.
movie_3
select t2.first_name, t2.last_name from payment as t1 inner join customer as t2 on t1.customer_id = t2.customer_id where t1.amount > 10
Question: list at least 5 customers who paid greater than $10. provide the full name of the customers. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> cate...
list at least 5 customers who paid greater than $10. provide the full name of the customers.
movie_3
select t3.title from film_actor as t1 inner join actor as t2 on t1.actor_id = t2.actor_id inner join film as t3 on t1.film_id = t3.film_id where t2.first_name = 'burt' and t2.last_name = 'dukakis'
Question: what films did burt dukakis got star in? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> city_id, city, c...
what films did burt dukakis got star in?
movie_3
select t2.first_name, t2.last_name from film_actor as t1 inner join actor as t2 on t1.actor_id = t2.actor_id inner join film as t3 on t1.film_id = t3.film_id where t3.title = 'ending crowds'
Question: provide the full name of all the actors of the film 'ending crowds'. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_upda...
provide the full name of all the actors of the film 'ending crowds'.
movie_3
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 = 'bound cheaper'
Question: who are the actors starred in the film 'bound cheaper'? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> c...
who are the actors starred in the film 'bound cheaper'?
movie_3
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 = 'karl' and t1.last_name = 'berry' and t3.rating = 'pg'
Question: list all the films that karl berr starred in and rated as pg. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. cit...
list all the films that karl berr starred in and rated as pg.
movie_3
select t1.city from city as t1 inner join country as t2 on t2.country_id = t1.country_id where country = 'philippines'
Question: list at least 3 cities under the country of philippines. | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -> ...
list at least 3 cities under the country of philippines.
movie_3
select t.title from ( select t3.title, count(t1.customer_id) as num 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 group by t3.title ) as t order by t.num desc limit 1
Question: what are the films that are least rented by the customers? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city -...
what are the films that are least rented by the customers?
movie_3
select t1.film_id from film_actor as t1 inner join actor as t2 on t1.actor_id = t2.actor_id where t2.first_name = 'lucille' and t2.last_name = 'tracy'
Question: list all the description of the films starring lucille tracy? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. cit...
list all the description of the films starring lucille tracy?
movie_3
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 = 'beach heartbreakers'
Question: which category is the film 'beach heartbreakers' falls into? | Tables: film_text -> film_id, title, description. actor -> actor_id, first_name, last_name, last_update. address -> address_id, address, address2, district, city_id, postal_code, phone, last_update. category -> category_id, name, last_update. city...
which category is the film 'beach heartbreakers' falls into?