context
stringlengths 11
9.12k
| question
stringlengths 0
1.06k
| SQL
stringlengths 2
4.44k
| source
stringclasses 28
values |
---|---|---|---|
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Provide the full names and emails of customers whose payments were greater than 70% of the average. | 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 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | How many films have a rental rate of 0.99? | SELECT COUNT(film_id) FROM film WHERE rental_rate = 0.99 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Among the customers with customer ID of 100 and below, how many of them have Thomas as their last name? | SELECT COUNT(customer_id) FROM customer WHERE last_name = 'Thomas' AND customer_id < 100 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | 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". | 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' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Give the title of the film starred by Liza Bergman with the highest replacement cost. | 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 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Among films with store ID of 2, list the title of films with the highest rental rate. | 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 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Among the films starred by Angelina Astaire, what is the title of the film with a replacement cost of 27.99? | 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 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | List the inventory ID of the film titled "African Egg". | 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' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | In films with a length duration of 113 minutes, how many of the films are starred by Kirk Jovovich? | 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' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | In the film with an inventory ID between 20 to 60, how many of the films have a G rating? | 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' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Among films with a rental rate of 4.99, what is the total number of films starred by Bob Fawcett? | 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' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What is the inventory ID of the films starred by Russell Close with a duration between 110 to 150 minutes? | 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' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What is the store and inventory ID of the film with the longest duration? | 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 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | List the titles of the films starred by Elvis Marx. | 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' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | In films with rental rate of 4.99, list down the inventory ID of the films starred by Lucille Dee. | 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 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | List the store ID of the films with a rental rate greater than the 60% of average rental rate of all listed films. | 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 ) | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Among the films starred by Nick Wahlberg, what is the percentage of the films with G rating? | SELECT CAST(SUM(IIF(T3.rating = 'G', 1, 0)) AS REAL) / COUNT(T3.film_id) FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'Elvis' AND T1.last_name = 'Marx' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | List the address in Texas in the ascending order of city id. | SELECT address FROM address WHERE district = 'Texas' AND city_id = ( SELECT MIN(city_id) FROM address WHERE district = 'Texas' ) | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Find the full name and email address of inactive customers whose record was created in 2006. | SELECT first_name, last_name, email FROM customer WHERE STRFTIME('%Y',create_date) = '2006' AND active = 0 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What percentage of the movies are PG-13? | SELECT CAST(SUM(IIF(rating = 'PG-13', 1, 0)) AS REAL) * 100 / COUNT(film_id) FROM film | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Please list the top ten movies with the most price per day in descending order of price per day. | SELECT title FROM film ORDER BY rental_rate / rental_duration DESC LIMIT 10 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Calculate the average rent amount paid by the customer with customer id 15. | SELECT AVG(amount) FROM payment WHERE customer_id = 15 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | How many customers rented for an above-average period? | SELECT COUNT(customer_id) FROM rental WHERE return_date - rental_date > ( SELECT AVG(return_date - rental_date) FROM rental ) | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Among the movies, what percentage are horror? | SELECT CAST(SUM(IIF(T2.name = 'horror', 1, 0)) AS REAL) * 100 / COUNT(T2.category_id) FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Give the full name of the actor who acted in the most number of movies? | 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 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Give the full name of the actor who acted the most in drama movies? | SELECT T.first_name, T.last_name FROM ( SELECT T1.first_name, T1.last_name, COUNT(T2.film_id) AS num FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film_category AS T3 ON T2.film_id = T3.film_id WHERE T3.category_id = 7 GROUP BY T1.first_name, T1.last_name ) AS T ORDER BY T.num DESC LIMIT 1 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What is the difference in the average number of films rented each day in Australia and Canada? | SELECT AVG(IIF(T4.country = 'Australia', 1, 0)) - AVG(IIF(T4.country = 'Canada', 1, 0)) AS diff FROM customer AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id INNER JOIN city AS T3 ON T2.city_id = T3.city_id INNER JOIN country AS T4 ON T3.country_id = T4.country_id | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Of the movies in which Reese Kilmer acted, what percentage are action movies? | SELECT CAST(SUM(IIF(T4.name = 'Action', 1, 0)) AS REAL) * 100 / COUNT(T1.actor_id) FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film_category AS T3 ON T2.film_id = T3.film_id INNER JOIN category AS T4 ON T3.category_id = T4.category_id WHERE T1.first_name = 'Reese' AND T1.last_name = 'Kilmer' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Give the total amount of rent for the movie Clockwork Paradice. | SELECT SUM(T1.amount) FROM payment AS T1 INNER JOIN rental AS T2 ON T1.rental_id = T2.rental_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T4.title = 'CLOCKWORK PARADICE' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Find and list the full name of customers who rented more than five types of movies. | SELECT T.first_name, T.last_name FROM ( SELECT T1.first_name, T1.last_name, COUNT(T1.customer_id) AS num FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id INNER JOIN film_category AS T5 ON T4.film_id = T5.film_id GROUP BY T1.first_name, T1.last_name ) AS T WHERE T.num > 5 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What is the average number of actors acted in comedy movies? | SELECT AVG(T1.actor_id) FROM film_actor AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id INNER JOIN actor AS T4 ON T4.actor_id = T1.actor_id WHERE T3.name = 'comedy' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | In children's movies, which was rented the most? | SELECT T.title FROM ( SELECT T4.title, COUNT(T4.title) AS num FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id INNER JOIN film_category AS T5 ON T4.film_id = T5.film_id INNER JOIN category AS T6 ON T5.category_id = T6.category_id WHERE T6.name = 'Children' GROUP BY T4.title ) AS T ORDER BY T.num DESC LIMIT 1 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Calculate the percentage of customers who paid more than the average rent amount in store 1. | SELECT CAST(( SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN payment AS T2 ON T1.customer_id = T2.customer_id WHERE T2.amount > ( SELECT AVG(amount) FROM payment ) ) AS REAL) * 100 / ( SELECT COUNT(customer_id) FROM customer ) | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Find and list the full name of customers who rented more family movies than Sci-Fi movies. | SELECT DISTINCT IIF(SUM(IIF(T5.name = 'Family', 1, 0)) - SUM(IIF(T5.name = 'Sci-Fi', 1, 0)) > 0, T1.first_name, 0) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film_category AS T4 ON T4.film_id = T3.film_id INNER JOIN category AS T5 ON T4.category_id = T5.category_id GROUP BY T1.customer_id | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Indicate the title of all the films rated as 'Adults Only'. | SELECT title FROM film WHERE rating = 'NC-17' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | How many actors with the surname Kilmer are there? | SELECT COUNT(actor_id) FROM actor WHERE last_name = 'Kilmer' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | How many movies have a length longer than 100? | SELECT COUNT(film_id) FROM film WHERE length > 100 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | How many payments were made throughout the month of August 2005? | SELECT SUM(amount) FROM payment WHERE payment_date LIKE '2005-08%' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | To which country does the address '1386 Nakhon Sawan Boulevard' belong? | SELECT T1.country FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id INNER JOIN address AS T3 ON T2.city_id = T3.city_id WHERE T3.address = '1386 Nakhon Sawan Boulevard' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What language was the most used in movies released in 2006? | SELECT T.language_id FROM ( SELECT T1.language_id, COUNT(T1.language_id) AS num FROM film AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE STRFTIME('%Y',T1.release_year) = '2006' GROUP BY T1.language_id ) AS T ORDER BY T.num DESC LIMIT 1 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Indicate the title of all the films that are in the Classics category. | SELECT T2.title FROM film_category AS T1 INNER JOIN film AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T1.category_id = T3.category_id WHERE T3.name = 'Classics' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | How many rentals did Ella Oliver hire in June 2016? | SELECT COUNT(T1.rental_id) FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'ELLA' AND T2.last_name = 'ELLA' AND date(T1.rental_date) BETWEEN '2005-06-01' AND '2005-06-30' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | How many different clients have rented materials from Jon Stephens? | SELECT COUNT(T1.customer_id) FROM rental AS T1 INNER JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Jon' AND T2.last_name = 'Stephens' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What is the total amount paid for rentals made on July 29, 2005? | SELECT SUM(T2.amount) FROM rental AS T1 INNER JOIN payment AS T2 ON T1.rental_id = T2.rental_id WHERE date(T1.rental_date) = '2005-07-29%' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What is the first name of the customers whose address is in the postal code that begins with 76? | SELECT T1.first_name FROM customer AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id WHERE SUBSTR(T2.postal_code, 1, 2) = '76' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | On what date was the rented material for the movie BLOOD ARGONAUTS returned? | SELECT T1.rental_date FROM rental AS T1 INNER JOIN inventory AS T2 ON T1.inventory_id = T2.inventory_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'BLOOD ARGONAUTS' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What is the title of the films in which Cuba Allen acted? | SELECT T3.title FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'Cuba' AND T1.last_name = 'Allen' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | How many actors acted in movies in the Music category? | SELECT COUNT(T1.actor_id) FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id INNER JOIN film_category AS T4 ON T3.film_id = T4.film_id INNER JOIN category AS T5 ON T4.category_id = T5.category_id WHERE T5.name = 'Music' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What is the full name of the actor who has acted the most times in comedy films? | SELECT T.first_name, T.last_name FROM ( SELECT T4.first_name, T4.last_name, COUNT(T2.actor_id) AS num FROM film_category AS T1 INNER JOIN film_actor AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T1.category_id = T3.category_id INNER JOIN actor AS T4 ON T2.actor_id = T4.actor_id WHERE T3.name = 'Comedy' GROUP BY T4.first_name, T4.last_name ) AS T ORDER BY T.num DESC LIMIT 1 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | How many customers did not rent material at Mike's store? | SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN store AS T2 ON T1.store_id = T2.store_id INNER JOIN staff AS T3 ON T2.manager_staff_id = T3.staff_id WHERE T3.first_name != 'Mike' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Indicate the name of the actors of the films rated as 'Parents Strongly Precautioned' with the highest replacement cost. | SELECT T1.first_name, T1.last_name FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.rating = 'PG-13' ORDER BY T3.replacement_cost DESC LIMIT 1 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What is the name of the client who has the largest quantity of rented material without returning it? | SELECT T.first_name FROM ( SELECT T2.first_name, COUNT(T1.rental_date) AS num FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.first_name ) AS T ORDER BY T.num DESC LIMIT 1 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | How many customers live in the city of Miyakonojo? | SELECT COUNT(T3.customer_id) FROM city AS T1 INNER JOIN address AS T2 ON T1.city_id = T2.city_id INNER JOIN customer AS T3 ON T2.address_id = T3.address_id WHERE T1.city = 'Miyakonojo' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | How many non-active clients have not returned the rented material? | SELECT COUNT(T2.customer_id) FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.active = 0 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What is the title of the animated films that have the shortest length? | SELECT T1.title FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id ORDER BY T1.length LIMIT 1 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | In which country is the store where Hector Poinexter rents equipment located? | SELECT T5.country FROM customer AS T1 INNER JOIN store AS T2 ON T1.store_id = T2.store_id INNER JOIN address AS T3 ON T2.address_id = T3.address_id INNER JOIN city AS T4 ON T3.city_id = T4.city_id INNER JOIN country AS T5 ON T4.country_id = T5.country_id WHERE T1.first_name = 'HECTOR' AND T1.last_name = 'POINDEXTER' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What is the average rental payment in Horror movies? | SELECT AVG(T5.amount) FROM category AS T1 INNER JOIN film_category AS T2 ON T1.category_id = T2.category_id INNER JOIN inventory AS T3 ON T2.film_id = T3.film_id INNER JOIN rental AS T4 ON T3.inventory_id = T4.inventory_id INNER JOIN payment AS T5 ON T4.rental_id = T5.rental_id WHERE T1.name = 'Horror' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What is the average amount of rent that Christy Vargas paid? | SELECT AVG(T2.amount) FROM customer AS T1 INNER JOIN payment AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'CHRISTY' AND T1.Last_name = 'VARGAS' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What percentage of films with a length of less than 100 belong to the Drama category? | SELECT CAST(SUM(IIF(T2.length < 100 AND T3.name = 'Drama', 1, 0)) AS REAL) * 100 / COUNT(T1.film_id) FROM film_category AS T1 INNER JOIN film AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T1.category_id = T3.category_id | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What are the actors that have the same forename as Johnny? Please include in your answer the full names of these actors. | SELECT first_name, last_name FROM actor WHERE first_name = 'Johnny' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What are the address numbers that are located in Gansu district? | SELECT address_id FROM address WHERE district = 'Gansu' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Please list three types of film along with their IDs and the latest update. | SELECT DISTINCT name, category_id, last_update FROM category LIMIT 3 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Please list the full names of any three inactive customers. | SELECT first_name, last_name FROM customer WHERE active = 0 LIMIT 3 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What is the rental price per day for Airplane Sierra? | SELECT rental_rate / rental_duration AS result FROM film WHERE title = 'AIRPLANE SIERRA' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Where is store number 2 located? | SELECT T1.address, T1.address2, T1.district FROM address AS T1 INNER JOIN store AS T2 ON T1.address_id = T2.address_id WHERE T2.store_id = 2 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Which city does the address 1623 Kingstown Drive belong to? | SELECT T1.city FROM city AS T1 INNER JOIN address AS T2 ON T2.city_id = T1.city_id WHERE T2.address = '1623 Kingstown Drive' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Please name three cities that belong to Algeria. | SELECT T2.city FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id WHERE T1.country = 'Algeria' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What is the category of the film Agent Truman? | SELECT T3.name FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T1.title = 'AGENT TRUMAN' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Please list the titles of any three action films. | SELECT T1.title FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'Action' LIMIT 3 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What is the difference between the number of children's films and action films? | SELECT SUM(IIF(T2.name = 'Children', 1, 0)) - SUM(IIF(T2.name = 'Action', 1, 0)) AS diff FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Which district does Maria Miller live in? | SELECT T2.district FROM customer AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Maria' AND T1.last_name = 'Miller' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Who is the customer that is active and lives at 1795 Santiago de Compostela Way, Texas? | SELECT T1.first_name, T1.last_name FROM customer AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T2.address = '1795 Santiago de Compostela Way' AND T1.active = 1 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | How many English films have a duration of over 50 minutes and the cost of replacement are under 10.99? | SELECT COUNT(T1.film_id) FROM film AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE T2.name = 'English' AND T1.length > 50 AND T1.replacement_cost < 10.99 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Who are the actors that act in the ACADEMY DINOSAUR film? | SELECT T1.first_name, T1.last_name FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'ACADEMY DINOSAUR' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Please list any two films that Penelope Guiness acted in. | 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 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What is the percentage of documentary films? | 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 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | How many films in English are for adults only? | 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' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Which film has the longest duration? | SELECT title FROM film WHERE length = ( SELECT MAX(length) FROM film ) | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | How many of the actors are named "Dan"? | SELECT COUNT(actor_id) FROM actor WHERE first_name = 'Dan' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What is the most common first name among the customers? | SELECT first_name FROM customer GROUP BY first_name ORDER BY COUNT(first_name) DESC LIMIT 1 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What are the ratings of the film featuring behind the scenes? | SELECT rating FROM film WHERE special_features LIKE '%Behind the Scenes%' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What is the largest number of films rented per customer? | SELECT COUNT(rental_id) FROM rental GROUP BY customer_id ORDER BY COUNT(rental_id) DESC LIMIT 1 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | List all the films with the word "Lacklusture" in their description. | SELECT title FROM film_text WHERE description LIKE '%Lacklusture%' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | How many films did a customer named Francis Sikes rent? | 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' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Who is the manager of the store with the largest collection of films? | 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 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What are the addresses of the inactive customers? | SELECT T2.address FROM customer AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.active = 0 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Which category is the most common? | 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 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Provide the cast for the film "Jason trap". | 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' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Who is the customer with the largest payment for rental films? | 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 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | List the top 5 most-rented films. | 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 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Which country does Sasebo belong to? | SELECT T1.country FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id WHERE T2.city = 'Sasebo' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What are the addresses for the stores? | SELECT T2.address FROM store AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | List all the animation titles. | 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' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What is the city with the most customers? | 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 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Which actor acted in the most films? | 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 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | What percentage of films are horror films? | 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 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Please indicate the full name of actor id 5. | SELECT first_name, last_name FROM actor WHERE actor_id = 5 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | How many id movies have category id 11? | SELECT COUNT(film_id) FROM film_category WHERE category_id = 11 | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Which category does BABY HALL film belong to? | 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' | bird |
CREATE TABLE movie_3 (film_id integer, title text, description text, actor_id integer, first_name text, last_name text, last_update datetime, address_id integer, address text, address2 text, district text, city_id integer, postal_code text, phone text, last_update datetime, category_id integer, name text, last_update datetime, city_id integer, city text, country_id integer, last_update datetime, country_id integer, country text, last_update datetime, customer_id integer, store_id integer, first_name text, last_name text, email text, address_id integer, active integer, create_date datetime, last_update datetime, film_id integer, title text, description text, release_year text, language_id integer, original_language_id integer, rental_duration integer, rental_rate real, length integer, replacement_cost real, rating text, special_features text, last_update datetime, actor_id integer, film_id integer, last_update datetime, film_id integer, category_id integer, last_update datetime, inventory_id integer, film_id integer, store_id integer, last_update datetime, language_id integer, name text, last_update datetime, payment_id integer, customer_id integer, staff_id integer, rental_id integer, amount real, payment_date datetime, last_update datetime, rental_id integer, rental_date datetime, inventory_id integer, customer_id integer, return_date datetime, staff_id integer, last_update datetime, staff_id integer, first_name text, last_name text, address_id integer, picture blob, email text, store_id integer, active integer, username text, password text, last_update datetime, store_id integer, manager_staff_id integer, address_id integer, last_update datetime) | Give the full name of the actor with the highest rental rate. | 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 | bird |
Subsets and Splits