instruction
stringlengths 646
49.5k
| input
stringclasses 1
value | output
stringlengths 23
804
|
---|---|---|
Solve the following sql problem:
List at least 10 films that falls into the Horror category.
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT T1.title FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'Horror' |
|
Solve the following sql problem:
Who among the actors starred in a NC-17 rated film? Provide only the last name of the actors.
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT T1.last_name FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.rating = 'NC-17' |
|
Solve the following sql problem:
Calculate the average rate of renting the film that Lucille Tracy got starred.
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT AVG(T3.rental_rate) FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'LUCILLE' AND T1.last_name = 'TRACY' |
|
Solve the following sql problem:
How many films have a duration between 100 to 110 minutes?
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT COUNT(film_id) FROM film WHERE length BETWEEN 100 AND 110 |
|
Solve the following sql problem:
List down the actor ID of actors with Dee as their last name.
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT actor_id FROM actor WHERE last_name = 'Dee' |
|
Solve the following sql problem:
Among the active customers, how many of them have Nina as their first name?
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT COUNT(customer_id) FROM customer WHERE first_name = 'Nina' AND active = 1 |
|
Solve the following sql problem:
In store ID 2, how many of the films are R rating?
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT COUNT(T1.film_id) FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T2.store_id = 2 AND T1.rating = 'R' |
|
Solve the following sql problem:
List the store ID of the films starred by Reese West with a duration of 100 minutes and below?
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT T4.store_id FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id INNER JOIN inventory AS T4 ON T3.film_id = T4.film_id WHERE T3.length < 100 AND T1.first_name = 'Reese' AND T1.last_name = 'West' |
|
Solve the following sql problem:
Give the duration of the film starred by Nick Wahlberg with the highest rental rate.
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT T3.title FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'Nick' AND T1.last_name = 'Wahlberg' ORDER BY T3.rental_rate DESC LIMIT 1 |
|
Solve the following sql problem:
What are the titles of the films starred by Russell Close?
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT T3.title FROM film_actor AS T1 INNER JOIN actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T1.film_id = T3.film_id WHERE T2.first_name = 'Russell' AND T2.last_name = 'Close' |
|
Solve the following sql problem:
List the store ID of the film titled "Amadeus Holy".
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT T2.store_id FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T1.title = 'Amadeus Holy' |
|
Solve the following sql problem:
In films with a rental rate of 2.99, how many of the films are starred by Nina Soto?
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT COUNT(T1.film_id) FROM film_actor AS T1 INNER JOIN actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T1.film_id = T3.film_id WHERE T3.rental_rate = 2.99 AND T2.first_name = 'Nina' AND T2.last_name = 'Soto' |
|
Solve the following sql problem:
Among the films starred by Reese West, what is the difference between the films that have store ID of 1 and store ID of 2?
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT SUM(IIF(T4.film_id = 1, 1, 0)) - SUM(IIF(T4.film_id = 2, 1, 0)) AS diff FROM film_actor AS T1 INNER JOIN actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T1.film_id = T3.film_id INNER JOIN inventory AS T4 ON T3.film_id = T4.film_id WHERE T2.first_name = 'Reese' AND T2.last_name = 'West' |
|
Solve the following sql problem:
What is the postal code of the address 692 Joliet Street?
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT postal_code FROM address WHERE address = '692 Joliet Street' |
|
Solve the following sql problem:
How many customers are active?
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT COUNT(customer_id) FROM customer WHERE active = 1 |
|
Solve the following sql problem:
Among all the customers of store no.1, how many of them are active?
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT COUNT(customer_id) FROM customer WHERE active = 1 AND store_id = 1 |
|
Solve the following sql problem:
What is the address of Mary Smith?
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT T1.address FROM address AS T1 INNER JOIN customer AS T2 ON T1.address_id = T2.address_id WHERE T2.first_name = 'MARY' AND T2.last_name = 'SMITH' |
|
Solve the following sql problem:
Among all the active customers, how many of them live in Arlington?
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT COUNT(T2.customer_id) FROM address AS T1 INNER JOIN customer AS T2 ON T1.address_id = T2.address_id INNER JOIN city AS T3 ON T1.city_id = T3.city_id WHERE T2.active = 1 AND T3.city = 'Arlington' |
|
Solve the following sql problem:
Please list the full names of all the customers who live in Italy.
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT T4.first_name, T4.last_name FROM address AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN country AS T3 ON T2.country_id = T3.country_id INNER JOIN customer AS T4 ON T1.address_id = T4.address_id WHERE T3.country = 'Italy' |
|
Solve the following sql problem:
Which country does Mary Smith live in?
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT T3.country FROM address AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN country AS T3 ON T2.country_id = T3.country_id INNER JOIN customer AS T4 ON T1.address_id = T4.address_id WHERE T4.first_name = 'MARY' AND T4.last_name = 'SMITH' |
|
Solve the following sql problem:
What is the biggest amount of payment for a rental made by Mary Smith?
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT T1.amount FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'MARY' AND T2.last_name = 'SMITH' ORDER BY T1.amount DESC LIMIT 1 |
|
Solve the following sql problem:
How many times has Mary Smith rented a film?
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT COUNT(T1.customer_id) FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'MARY' AND T2.last_name = 'SMITH' |
|
Solve the following sql problem:
What is the total amount of money Mary Smith has spent on film rentals?
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT SUM(T1.amount) FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'MARY' AND T2.last_name = 'SMITH' |
|
Solve the following sql problem:
Among the times Mary Smith had rented a movie, how many of them happened in June, 2005?
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT COUNT(T1.customer_id) FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'MARY' AND T2.last_name = 'SMITH' AND STRFTIME('%Y',T1.payment_date) = '2005' AND STRFTIME('%Y', T1.payment_date) = '6' |
|
Solve the following sql problem:
Please give the full name of the customer who had made the biggest amount of payment in one single film rental.
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT T2.first_name, T2.last_name FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id ORDER BY T1.amount DESC LIMIT 1 |
|
Solve the following sql problem:
How much in total had the customers in Italy spent on film rentals?
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| SELECT SUM(T5.amount) FROM address AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN country AS T3 ON T2.country_id = T3.country_id INNER JOIN customer AS T4 ON T1.address_id = T4.address_id INNER JOIN payment AS T5 ON T4.customer_id = T5.customer_id WHERE T3.country = 'Italy' |
|
Solve the following sql problem:
Among the payments made by Mary Smith, how many of them are over 4.99?
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| 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 |
|
Solve the following sql problem:
What is the average amount of money spent by a customer in Italy on a single film rental?
Schema:
SCHEMA:
- Table: film_text
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Table: actor
- Column: actor_id
- Samples: [1, 2, 3, 4, 5]
- Column: first_name
- Samples: [PENELOPE, NICK, ED, JENNIFER, JOHNNY]
- Column: last_name
- Samples: [GUINESS, WAHLBERG, CHASE, DAVIS, LOLLOBRIGIDA]
- Column: last_update
- Samples: [2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0, 2006-02-15 04:34:33.0]
- Table: address
- Column: address_id
- Samples: [1, 2, 3, 4, 5]
- Column: address
- Samples: [47 MySakila Drive, 28 MySQL Boulevard, 23 Workhaven Lane, 1411 Lillydale Drive, 1913 Hanoi Way]
- Column: address2
- Samples: [None, None, None, None, ]
- Column: district
- Samples: [Alberta, QLD, Alberta, QLD, Nagasaki]
- Column: city_id
- Samples: [300, 576, 300, 576, 463]
- Column: postal_code
- Samples: [, , , , 35200]
- Column: phone
- Samples: [, , 14033335568, 6172235589, 28303384290]
- Column: last_update
- Samples: [2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0, 2006-02-15 04:45:30.0]
- Table: category
- Column: category_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [Action, Animation, Children, Classics, Comedy]
- Column: last_update
- Samples: [2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0, 2006-02-15 04:46:27.0]
- Table: city
- Column: city_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [A Corua (La Corua), Abha, Abu Dhabi, Acua, Adana]
- Column: country_id
- Samples: [87, 82, 101, 60, 97]
- Column: last_update
- Samples: [2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0, 2006-02-15 04:45:25.0]
- Table: country
- Column: country_id
- Samples: [1, 2, 3, 4, 5]
- Column: country
- Samples: [Afghanistan, Algeria, American Samoa, Angola, Anguilla]
- Column: last_update
- Samples: [2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0, 2006-02-15 04:44:00.0]
- Table: customer
- Column: customer_id
- Samples: [1, 2, 3, 4, 5]
- Column: store_id
- Samples: [1, 1, 1, 2, 1]
- Column: first_name
- Samples: [MARY, PATRICIA, LINDA, BARBARA, ELIZABETH]
- Column: last_name
- Samples: [SMITH, JOHNSON, WILLIAMS, JONES, BROWN]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_id
- Samples: [5, 6, 7, 8, 9]
- Column: active
- Samples: [1, 1, 1, 1, 1]
- Column: create_date
- Samples: [2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0, 2006-02-14 22:04:36.0]
- Column: last_update
- Samples: [2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0, 2006-02-15 04:57:20.0]
- Table: film
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: title
- Samples: [ACADEMY DINOSAUR, ACE GOLDFINGER, ADAPTATION HOLES, AFFAIR PREJUDICE, AFRICAN EGG]
- Column: description
- Samples: [A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teach..., A Astounding Epistle of a Database Administrator And a Explorer who mu..., A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumb..., A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a ..., A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursu... (truncated)]
- Column: release_year
- Samples: [2006, 2006, 2006, 2006, 2006]
- Column: language_id
- Samples: [1, 1, 1, 1, 1]
- Column: original_language_id
- Samples: [None, None, None, None, None]
- Column: rental_duration
- Samples: [6, 3, 7, 5, 6]
- Column: rental_rate
- Samples: [0.99, 4.99, 2.99, 2.99, 2.99]
- Column: length
- Samples: [86, 48, 50, 117, 130]
- Column: replacement_cost
- Samples: [20.99, 12.99, 18.99, 26.99, 22.99]
- Column: rating
- Samples: [PG, G, NC-17, G, G]
- Column: special_features
- Samples: [Deleted Scenes,Behind the Scenes, Trailers,Deleted Scenes, Trailers,Deleted Scenes, Commentaries,Behind the Scenes, Deleted Scenes]
- Column: last_update
- Samples: [2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0, 2006-02-15 05:03:42.0]
- Table: film_actor
- Column: actor_id
- Samples: [1, 1, 1, 1, 1]
- Column: film_id
- Samples: [1, 23, 25, 106, 140]
- Column: last_update
- Samples: [2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0, 2006-02-15 05:05:03.0]
- Table: film_category
- Column: film_id
- Samples: [1, 2, 3, 4, 5]
- Column: category_id
- Samples: [6, 11, 6, 11, 8]
- Column: last_update
- Samples: [2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0, 2006-02-15 05:07:09.0]
- Table: inventory
- Column: inventory_id
- Samples: [1, 2, 3, 4, 5]
- Column: film_id
- Samples: [1, 1, 1, 1, 1]
- Column: store_id
- Samples: [1, 1, 1, 1, 2]
- Column: last_update
- Samples: [2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0, 2006-02-15 05:09:17.0]
- Table: language
- Column: language_id
- Samples: [1, 2, 3, 4, 5]
- Column: name
- Samples: [English, Italian, Japanese, Mandarin, French]
- Column: last_update
- Samples: [2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0, 2006-02-15 05:02:19.0]
- Table: payment
- Column: payment_id
- Samples: [1, 2, 3, 4, 5]
- Column: customer_id
- Samples: [1, 1, 1, 1, 1]
- Column: staff_id
- Samples: [1, 1, 1, 2, 2]
- Column: rental_id
- Samples: [76, 573, 1185, 1422, 1476]
- Column: amount
- Samples: [2.99, 0.99, 5.99, 0.99, 9.99]
- Column: payment_date
- Samples: [2005-05-25 11:30:37.0, 2005-05-28 10:35:23.0, 2005-06-15 00:54:12.0, 2005-06-15 18:02:53.0, 2005-06-15 21:08:46.0]
- Column: last_update
- Samples: [2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0, 2006-02-15 22:12:30.0]
- Table: rental
- Column: rental_id
- Samples: [1, 2, 3, 4, 5]
- Column: rental_date
- Samples: [2005-05-24 22:53:30.0, 2005-05-24 22:54:33.0, 2005-05-24 23:03:39.0, 2005-05-24 23:04:41.0, 2005-05-24 23:05:21.0]
- Column: inventory_id
- Samples: [367, 1525, 1711, 2452, 2079]
- Column: customer_id
- Samples: [130, 459, 408, 333, 222]
- Column: return_date
- Samples: [2005-05-26 22:04:30.0, 2005-05-28 19:40:33.0, 2005-06-01 22:12:39.0, 2005-06-03 01:43:41.0, 2005-06-02 04:33:21.0]
- Column: staff_id
- Samples: [1, 1, 1, 2, 1]
- Column: last_update
- Samples: [2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0, 2006-02-15 21:30:53.0]
- Table: staff
- Column: staff_id
- Samples: [1, 2]
- Column: first_name
- Samples: [Mike, Jon]
- Column: last_name
- Samples: [Hillyer, Stephens]
- Column: address_id
- Samples: [3, 4]
- Column: picture
- Samples: [0x3F504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD96500..., None (truncated)]
- Column: email
- Samples: [[email protected], [email protected]]
- Column: store_id
- Samples: [1, 2]
- Column: active
- Samples: [1, 1]
- Column: username
- Samples: [Mike, Jon]
- Column: password
- Samples: [8cb2237d0679ca88db6464eac60da96345513964, 8cb2237d0679ca88db6464eac60da96345513964]
- Column: last_update
- Samples: [2006-02-15 04:57:16.0, 2006-02-15 04:57:16.0]
- Table: store
- Column: store_id
- Samples: [1, 2]
- Column: manager_staff_id
- Samples: [1, 2]
- Column: address_id
- Samples: [1, 2]
- Column: last_update
- Samples: [2006-02-15 04:57:12.0, 2006-02-15 04:57:12.0]
| 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' |