id int64 0 9.43k | db_id stringclasses 69
values | schema stringclasses 69
values | question stringlengths 24 325 | output stringlengths 23 804 | evidence stringlengths 0 673 | filtered_schema listlengths 0 16 |
|---|---|---|---|---|---|---|
9,400 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | List at least 10 films that falls into the Horror category. | 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' | film refers to title; Horror category refers to category.name = 'Horror' | [
"category.category_id",
"category.name",
"film.film_id",
"film.title",
"film_category.category_id",
"film_category.film_id"
] |
9,401 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | Who among the actors starred in a NC-17 rated film? Provide only the last name of the actors. | 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.rating = 'NC-17' | NC-17 rated refers to rating = 'NC-17' | [
"actor.actor_id",
"actor.last_name",
"film.film_id",
"film.rating",
"film_actor.actor_id",
"film_actor.film_id"
] |
9,402 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | Calculate the average rate of renting the film that Lucille Tracy got starred. | SELECT AVG(T3.rental_rate) 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 = 'LUCILLE' AND T1.last_name = 'TRACY' | average rate = divide(sum(rental_rate), count(film_id)) | [
"actor.actor_id",
"actor.first_name",
"actor.last_name",
"film.film_id",
"film.rental_rate",
"film_actor.actor_id",
"film_actor.film_id"
] |
9,403 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | How many films have a duration between 100 to 110 minutes? | SELECT COUNT(film_id) FROM film WHERE length BETWEEN 100 AND 110 | duration between 100 to 110 minutes refers to length between 100 and 110 | [
"film.film_id",
"film.length"
] |
9,404 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | List down the actor ID of actors with Dee as their last name. | SELECT actor_id FROM actor WHERE last_name = 'Dee' | [
"actor.actor_id",
"actor.last_name"
] | |
9,405 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | Among the active customers, how many of them have Nina as their first name? | SELECT COUNT(customer_id) FROM customer WHERE first_name = 'Nina' AND active = 1 | active refers to active = 1 | [
"customer.active",
"customer.customer_id",
"customer.first_name"
] |
9,406 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | In store ID 2, how many of the films are R rating?
| SELECT COUNT(T1.film_id) FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T2.store_id = 2 AND T1.rating = 'R' | R rating refers to rating = 'R' | [
"film.film_id",
"film.rating",
"inventory.film_id",
"inventory.store_id"
] |
9,407 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | List the store ID of the films starred by Reese West with a duration of 100 minutes and below? | SELECT T4.store_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 < 100 AND T1.first_name = 'Reese' AND T1.last_name = 'West' | a duration of 100 minutes and below refers to length < 100 | [
"actor.actor_id",
"actor.first_name",
"actor.last_name",
"film.film_id",
"film.length",
"film_actor.actor_id",
"film_actor.film_id",
"inventory.film_id",
"inventory.store_id"
] |
9,408 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | Give the duration of the film starred by Nick Wahlberg with the highest rental rate. | 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 = 'Nick' AND T1.last_name = 'Wahlberg' ORDER BY T3.rental_rate DESC LIMIT 1 | duration refers to length; the highest rental rate refers to max(rental_rate) | [
"actor.actor_id",
"actor.first_name",
"actor.last_name",
"film.film_id",
"film.rental_rate",
"film.title",
"film_actor.actor_id",
"film_actor.film_id"
] |
9,409 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | What are the titles of the films starred by Russell Close? | 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 = 'Russell' AND T2.last_name = 'Close' | [
"actor.actor_id",
"actor.first_name",
"actor.last_name",
"film.film_id",
"film.title",
"film_actor.actor_id",
"film_actor.film_id"
] | |
9,410 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | List the store ID of the film titled "Amadeus Holy". | SELECT T2.store_id FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T1.title = 'Amadeus Holy' | [
"film.film_id",
"film.title",
"inventory.film_id",
"inventory.store_id"
] | |
9,411 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | In films with a rental rate of 2.99, how many of the films are starred by Nina Soto? | SELECT COUNT(T1.film_id) 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.rental_rate = 2.99 AND T2.first_name = 'Nina' AND T2.last_name = 'Soto' | a rental rate of 2.99 refers to rental_rate = 2.99 | [
"actor.actor_id",
"actor.first_name",
"actor.last_name",
"film.film_id",
"film.rental_rate",
"film_actor.actor_id",
"film_actor.film_id"
] |
9,412 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | Among the films starred by Reese West, what is the difference between the films that have store ID of 1 and store ID of 2? | SELECT SUM(IIF(T4.film_id = 1, 1, 0)) - SUM(IIF(T4.film_id = 2, 1, 0)) AS diff 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 INNER JOIN inventory AS T4 ON T3.film_id = T4.film_id WHERE T2.first_name = 'Reese' AND T2.last_name = 'West' | result = subtract(count(film_id where store_id = 1), count(film_id where store_id = 2)) | [
"actor.actor_id",
"actor.first_name",
"actor.last_name",
"film.film_id",
"film_actor.actor_id",
"film_actor.film_id",
"inventory.film_id"
] |
9,413 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | What is the postal code of the address 692 Joliet Street? | SELECT postal_code FROM address WHERE address = '692 Joliet Street' | [
"address.address",
"address.postal_code"
] | |
9,414 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | How many customers are active? | SELECT COUNT(customer_id) FROM customer WHERE active = 1 | active refers to active = 1 | [
"customer.active",
"customer.customer_id"
] |
9,415 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | Among all the customers of store no.1, how many of them are active? | SELECT COUNT(customer_id) FROM customer WHERE active = 1 AND store_id = 1 | active refers to active = 1 | [
"customer.active",
"customer.customer_id",
"customer.store_id"
] |
9,416 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | What is the address of Mary Smith? | SELECT T1.address FROM address AS T1 INNER JOIN customer AS T2 ON T1.address_id = T2.address_id WHERE T2.first_name = 'MARY' AND T2.last_name = 'SMITH' | [
"address.address",
"address.address_id",
"customer.address_id",
"customer.first_name",
"customer.last_name"
] | |
9,417 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | Among all the active customers, how many of them live in Arlington? | SELECT COUNT(T2.customer_id) FROM address AS T1 INNER JOIN customer AS T2 ON T1.address_id = T2.address_id INNER JOIN city AS T3 ON T1.city_id = T3.city_id WHERE T2.active = 1 AND T3.city = 'Arlington' | active refers to active = 1; Arlington refers to city = 'Arlington' | [
"address.address_id",
"address.city_id",
"city.city",
"city.city_id",
"customer.active",
"customer.address_id",
"customer.customer_id"
] |
9,418 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | Please list the full names of all the customers who live in Italy. | SELECT T4.first_name, T4.last_name FROM address AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN country AS T3 ON T2.country_id = T3.country_id INNER JOIN customer AS T4 ON T1.address_id = T4.address_id WHERE T3.country = 'Italy' | full name refers to first_name, last_name; Italy refers to country = 'Italy' | [
"address.address_id",
"address.city_id",
"city.city_id",
"city.country_id",
"country.country",
"country.country_id",
"customer.address_id",
"customer.first_name",
"customer.last_name"
] |
9,419 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | Which country does Mary Smith live in? | SELECT T3.country FROM address AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN country AS T3 ON T2.country_id = T3.country_id INNER JOIN customer AS T4 ON T1.address_id = T4.address_id WHERE T4.first_name = 'MARY' AND T4.last_name = 'SMITH' | [
"address.address_id",
"address.city_id",
"city.city_id",
"city.country_id",
"country.country",
"country.country_id",
"customer.address_id",
"customer.first_name",
"customer.last_name"
] | |
9,420 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | What is the biggest amount of payment for a rental made by Mary Smith? | SELECT T1.amount FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'MARY' AND T2.last_name = 'SMITH' ORDER BY T1.amount DESC LIMIT 1 | the biggest amount refers to max(amount) | [
"customer.customer_id",
"customer.first_name",
"customer.last_name",
"payment.amount",
"payment.customer_id"
] |
9,421 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | How many times has Mary Smith rented a film? | SELECT COUNT(T1.customer_id) FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'MARY' AND T2.last_name = 'SMITH' | [
"customer.customer_id",
"customer.first_name",
"customer.last_name",
"payment.customer_id"
] | |
9,422 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | What is the total amount of money Mary Smith has spent on film rentals? | SELECT SUM(T1.amount) FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'MARY' AND T2.last_name = 'SMITH' | the total amount = sum(amount) | [
"customer.customer_id",
"customer.first_name",
"customer.last_name",
"payment.amount",
"payment.customer_id"
] |
9,423 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | Among the times Mary Smith had rented a movie, how many of them happened in June, 2005? | SELECT COUNT(T1.customer_id) FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'MARY' AND T2.last_name = 'SMITH' AND STRFTIME('%Y',T1.payment_date) = '2005' AND STRFTIME('%Y', T1.payment_date) = '6' | in June 2005 refers to year(payment_date) = 2005 and month(payment_date) = 6 | [
"customer.customer_id",
"customer.first_name",
"customer.last_name",
"payment.customer_id",
"payment.payment_date"
] |
9,424 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | Please give the full name of the customer who had made the biggest amount of payment in one single film rental. | SELECT T2.first_name, T2.last_name FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id ORDER BY T1.amount DESC LIMIT 1 | full name refers to first_name, last_name; the biggest amount refers to max(amount) | [
"customer.customer_id",
"customer.first_name",
"customer.last_name",
"payment.amount",
"payment.customer_id"
] |
9,425 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | How much in total had the customers in Italy spent on film rentals? | SELECT SUM(T5.amount) FROM address AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN country AS T3 ON T2.country_id = T3.country_id INNER JOIN customer AS T4 ON T1.address_id = T4.address_id INNER JOIN payment AS T5 ON T4.customer_id = T5.customer_id WHERE T3.country = 'Italy' | total = sum(amount); Italy refers to country = 'Italy' | [
"address.address_id",
"address.city_id",
"city.city_id",
"city.country_id",
"country.country",
"country.country_id",
"customer.address_id",
"customer.customer_id",
"payment.amount",
"payment.customer_id"
] |
9,426 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | Among the payments made by Mary Smith, how many of them are over 4.99? | SELECT COUNT(T1.amount) FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'MARY' AND T2.last_name = 'SMITH' AND T1.amount > 4.99 | over 4.99 refers to amount > 4.99 | [
"customer.customer_id",
"customer.first_name",
"customer.last_name",
"payment.amount",
"payment.customer_id"
] |
9,427 | movie_3 | CREATE TABLE film_text
(
film_id INTEGER not null
primary key,
title TEXT not null,
description TEXT null
);
CREATE TABLE "actor"
(
actor_id INTEGER
primary key autoincrement,
first_name TEXT not null,
last_name TEXT ... | What is the average amount of money spent by a customer in Italy on a single film rental? | SELECT AVG(T5.amount) FROM address AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN country AS T3 ON T2.country_id = T3.country_id INNER JOIN customer AS T4 ON T1.address_id = T4.address_id INNER JOIN payment AS T5 ON T4.customer_id = T5.customer_id WHERE T3.country = 'Italy' | Italy refers to country = 'Italy'; average amount = divide(sum(amount), count(customer_id)) where country = 'Italy' | [
"address.address_id",
"address.city_id",
"city.city_id",
"city.country_id",
"country.country",
"country.country_id",
"customer.address_id",
"customer.customer_id",
"payment.amount",
"payment.customer_id"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.