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) | Among the payments made by Mary Smith, how many of them are over 4.99? | SELECT COUNT(T1.amount) FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'MARY' AND T2.last_name = 'SMITH' AND T1.amount > 4.99 | 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 money spent by a customer in Italy on a single film rental? | SELECT AVG(T5.amount) FROM address AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN country AS T3 ON T2.country_id = T3.country_id INNER JOIN customer AS T4 ON T1.address_id = T4.address_id INNER JOIN payment AS T5 ON T4.customer_id = T5.customer_id WHERE T3.country = 'Italy' | bird |