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 d...
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 d...
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