context_id
stringclasses 64
values | question_id
stringlengths 1
4
| question_prompt_info
dict | eval_info
dict |
|---|---|---|---|
movie_platform
|
142
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "Provide list titles created by user who are eligible for trial when he created the list.",
"evidence": "eligible for trial refers to user_eligible_for_trial = 1"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT DISTINCT T2.list_title FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T1.user_eligible_for_trial = 1"
}
|
movie_platform
|
103
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "Please list the names of the top three movies in the number comments related to the critic made by the user rating the movie.",
"evidence": "number of comments related to the critic made by the user rating the movie refers to critic_comments; top movie refers to Max(critic_comments);"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id ORDER BY T1.critic_comments DESC LIMIT 3"
}
|
movie_platform
|
136
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "Give the percentage of subscribers who rated who rated the movie \"G.I. Jane\".",
"evidence": "movie \"G.I. Jane\" refers to movie_title = 'G.I. Jane'; subscribers refers to user_subscriber = 1; percentage refers to DIVIDE(COUNT(user_subscriber = 1),COUNT(user_subscriber))*100"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT CAST(SUM(CASE WHEN T3.user_subscriber = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN lists_users AS T3 ON T1.user_id = T3.user_id WHERE T2.movie_title = 'G.I. Jane'"
}
|
movie_platform
|
30
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "How much is the popularity of the movie that has the highest popularity between 1920 to 1929 and when did the movie received its first rating score of 1 from the users who were a paying subscriber when they rated the movie ?",
"evidence": "movie with highest popularity refers to MAX(movie_popularity); movie_release_year BETWEEN 1920 AND 1929; when the movie received its first rating score of 1 refers to oldest date in rating_timestamp_utc where rating score = 1; user was a paying subscriber when they rated the movie refers to user_has_payment_method = 1;"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT MAX(T2.movie_popularity), MIN(T1.rating_timestamp_utc) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year BETWEEN 1920 AND 1929 AND T1.rating_score = 1 AND T1.user_has_payment_method = 1"
}
|
movie_platform
|
98
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "How many followers does the list created by the user whose user_avatar_image_url is https://assets.mubicdn.net/images/avatars/74983/images-w150.jpg?1523895214 have?",
"evidence": "followers refers to list_followers;"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT SUM(T2.list_followers) FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T1.user_avatar_image_url = 'https://assets.mubicdn.net/images/avatars/74983/images-w150.jpg?1523895214'"
}
|
movie_platform
|
140
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "What is the percentage of list created by user who was a subscriber when he created the list?",
"evidence": "was a subscriber refers to user_subscriber = 1; percentage refers to DIVIDE(COUNT(user_subscriber = 1),COUNT(list_id))"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT CAST(SUM(CASE WHEN user_subscriber = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(list_id) FROM lists_users"
}
|
movie_platform
|
80
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "Please list the movies rated by the user who created the movie list \"250 Favourite Films\".",
"evidence": "250 Favourite Films' is list_title; movies refers to movie_title;"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN lists AS T3 ON T3.user_id = T1.user_id WHERE T3.list_title = '250 Favourite Films'"
}
|
movie_platform
|
59
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "Was the user who created the list \"250 Favourite Films\" a trialist when he or she created the list?",
"evidence": "the user was a trialist when he created the list refers to user_trailist = 1; 250 Favourite Films is list_title;"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT T2.user_trialist FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T1.list_title = '250 Favourite Films'"
}
|
movie_platform
|
161
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "What is the average number of followers of the lists created by the user who rated the movie \"Pavee Lackeen: The Traveller Girl\" on 3/27/2011 at 2:06:34 AM?",
"evidence": "average number of followers refers to AVG(list_followers); movie \"Pavee Lackeen: The Traveller Girl\" refers to movie_title = 'Pavee Lackeen: The Traveller Girl'; on 3/27/2011 at 2:06:34 AM refers to rating_timestamp_utc = '2011-03-27 02:06:34'"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT CAST(SUM(T4.list_followers) AS REAL) / COUNT(T2.list_id) FROM ratings AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id INNER JOIN movies AS T3 ON T1.movie_id = T3.movie_id INNER JOIN lists AS T4 ON T2.list_id = T4.list_id WHERE T3.movie_title LIKE 'Pavee Lackeen: The Traveller Girl' AND T1.rating_timestamp_utc LIKE '2011-03-27 02:06:34'"
}
|
movie_platform
|
23
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "How many users gave \"Pavee Lackeen: The Traveller Girl\" movie a rating score of 4?",
"evidence": "FALSE;"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT COUNT(T2.user_id) FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T1.movie_title = 'Pavee Lackeen: The Traveller Girl' AND T2.rating_score = 4"
}
|
movie_platform
|
141
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "Name all lists created by a user who was a subcriber when created the list.",
"evidence": "was a subscriber refers to user_subscriber = 1"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT DISTINCT T2.list_id FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T1.user_subscriber = 1"
}
|
movie_platform
|
148
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "For the list with more than 200 followers, state the title and how long the list has been created?",
"evidence": "more than 200 followers refers to list_followers >200; how long the list has been created refers to SUBTRACT(CURRENT_TIMESTAMP,list_creation_timestamp_utc)"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT list_title , 365 * (strftime('%Y', 'now') - strftime('%Y', list_creation_timestamp_utc)) + 30 * (strftime('%m', 'now') - strftime('%m', list_creation_timestamp_utc)) + strftime('%d', 'now') - strftime('%d', list_creation_timestamp_utc) FROM lists WHERE list_followers > 200"
}
|
movie_platform
|
73
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "How many users were trialists when they rated the movie \"A Way of Life\"?",
"evidence": "A Way of Life' refers to movie_title; the user was a trialist when he rated the movie refers to user_trialist = 1;"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'When Will I Be Loved' AND T1.user_trialist = 1"
}
|
movie_platform
|
27
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "What is the average rating score of the movie \"When Will I Be Loved\" and who was its director?",
"evidence": "average rating score = AVG(rating_score);"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT AVG(T1.rating_score), T2.director_name FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'When Will I Be Loved'"
}
|
movie_platform
|
8
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "List all movie title rated in April 2020 from user who was a trialist.",
"evidence": "movie title rated in April 2020 refers to rating_timestamp_utc LIKE '%2020-04-%'; user is a trial list refers to user_trialist = 1;"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT T1.movie_title FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T2.user_trialist = 1 AND T2.rating_timestamp_utc LIKE '2020-04%'"
}
|
movie_platform
|
137
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "For all the users who gave \"A Shot in the Dark\" a rating, how many percent of them is a paying subscriber?",
"evidence": "\"A Shot in the Dark\" refers to movie_title = 'A Shot in the Dark'; paying subscriber refers to user_has_payment_method = 1; percentage refers to DIVIDE(COUNT(user_has_payment_method = 1),COUNT(user_has_payment_method))*100"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT CAST(SUM(CASE WHEN T1.user_has_payment_method = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN lists_users AS T3 ON T1.user_id = T3.user_id WHERE T2.movie_title = 'A Shot in the Dark'"
}
|
movie_platform
|
112
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "Which year had the most released films?",
"evidence": "year refers to movie_release_year; most release films refers to MAX(COUNT(movie_id))\n\n"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT movie_release_year FROM movies GROUP BY movie_release_year ORDER BY COUNT(movie_id) DESC LIMIT 1"
}
|
movie_platform
|
72
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "Was user 39115684 a trialist when he or she rated the movie \"A Way of Life\"?",
"evidence": "A Way of Life' refers to movie_title; user 39115684 refers to userid = 39115684; the user was a trialist when he rated the movie refers to user_trialist = 1;"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT T1.user_trialist FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'A Way of Life' AND T1.user_id = 39115684"
}
|
movie_platform
|
49
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "What is the average rating score of the 'Pavee Lackeen: The Traveller Girl' movie and what year was it released?",
"evidence": "year it was released refers to movie_release_year; average rating score refers to AVG(rating_score where movie_title = 'Final Destination 6'); Final Destination 6 refers to movie_title"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT AVG(T1.rating_score), T2.movie_release_year FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'Pavee Lackeen: The Traveller Girl'"
}
|
movie_platform
|
166
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "What are the top 10 oldest movies and what are the average rating score for each movie? Indicate the name of the director and when the movies were released.",
"evidence": "the average rating score refers to AVG(T2.rating_score); oldest movies refers to MIN(rating_timestamp_utc)"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT T2.movie_id, AVG(T1.rating_score), T2.director_name, T2.movie_release_year FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id ORDER BY T1.rating_timestamp_utc ASC LIMIT 10"
}
|
movie_platform
|
102
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "Which movie has the highest average score in Mubi?",
"evidence": "Highest average score refers to Max(Avg(rating_score));"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id GROUP BY T2.movie_title ORDER BY SUM(T1.rating_score) / COUNT(T1.rating_id) DESC LIMIT 1"
}
|
movie_platform
|
143
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "Among the lists with at least one follower, how many were created by user who was subscriber when created the list?",
"evidence": "lists with at least one follower refers to list_followers > = 1; was a subscriber refers to user_subscriber = 1"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT COUNT(T1.list_id) FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_followers >= 1 AND T1.user_subscriber = 1"
}
|
movie_platform
|
110
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "What percentage of users rated the movie \"Patti Smith: Dream of Life\" by more than 3?",
"evidence": "Patti Smith: Dream of Life' is movie_title; more than 3 refers to rating_score >3; percentage = Divide(Count(rating_score where rating_score >3), Count(rating_score))*100"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT CAST(SUM(CASE WHEN T1.rating_score > 3 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.rating_score) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title LIKE 'Patti Smith: Dream of Life'"
}
|
movie_platform
|
5
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "What is the average rating for movie titled 'When Will I Be Loved'?",
"evidence": "average rating = DIVIDE((SUM(rating_score where movie_title = 'When Will I Be Loved')), COUNT(rating_score));"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT AVG(T2.rating_score) FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T1.movie_title = 'When Will I Be Loved'"
}
|
movie_platform
|
35
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "How many users, who were a paying subscriber when they rated the movie, gave the movie that was released in 1924 and directed by Erich von Stroheim a rating score of 5?",
"evidence": "Directed by Buster Keaton refers to director_name; released in 1924 refers to movie_release_year = 1924; paying subscriber refers to user_has_payment_method = 1\n\n"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT COUNT(T2.user_id) FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T1.movie_release_year = 1924 AND T1.director_name = 'Erich von Stroheim' AND T2.rating_score = 5 AND T2.user_has_payment_method = 1"
}
|
movie_platform
|
38
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "How many users who created a list in the February of 2016 were eligible for trial when they created the list? Indicate the user id of the user who has the most number of followers in his list in February of 2016.",
"evidence": "created a list in the February of 2016 refer to list_creation_date_utc BETWEEN 2/1/2016 and 2/29/2016; eligible for trial refers to user_eligible_for_trial = 1;\n"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT T1.list_followers FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id AND T1.list_id = T2.list_id WHERE T2.list_creation_date_utc BETWEEN '2016-02-01' AND '2016-02-29' AND T2.user_eligible_for_trial = 1"
}
|
movie_platform
|
165
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "What is the name of the movie that was rated recently by user 57756708?",
"evidence": "user 57756708 refers to user_id = 57756708; rated recently refers to MAX(rating_timestamp_utc)"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.user_id = 57756708 ORDER BY T1.rating_timestamp_utc DESC LIMIT 1"
}
|
movie_platform
|
7
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "What is the percentage of the ratings were rated by user who was a subcriber?",
"evidence": "user is a subscriber refers to user_subscriber = 1; percentage of ratings = DIVIDE(SUM(user_subscriber = 1), SUM(rating_score)) as percent;"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT CAST(SUM(CASE WHEN user_subscriber = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM ratings"
}
|
movie_platform
|
16
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "What is the name of the most followed list?",
"evidence": "most followed list refers to MAX(list_followers);"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT list_title FROM lists ORDER BY list_followers DESC LIMIT 1"
}
|
movie_platform
|
18
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "What is the list ID that was first created by user 85981819?",
"evidence": "first created list refers to oldest list_creation_date_utc;"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT list_id FROM lists_users WHERE user_id = 85981819 ORDER BY list_creation_date_utc ASC LIMIT 1"
}
|
movie_platform
|
39
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "What is the URL to the rating on Mubi of the Riff-Raff movie that was given the highest rating score by user 22030372?",
"evidence": "URL refer to rating_url; user 22030372 refer to user_id"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT T2.rating_url FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T2.user_id = 22030372 AND T2.rating_score = 5 AND T1.movie_title = 'Riff-Raff'"
}
|
movie_platform
|
40
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "How many directors have directed atleast 10 movies between 1960 to 1985? Indicate the name of the movie in those years of each director that received the highest amount of 5 rating score.",
"evidence": "directed at least 10 movies refers to count(direct_name)>10; 1960 to 1985 refer to movie_release_year\n"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT T2.director_name FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year BETWEEN 1960 AND 1985 GROUP BY T2.director_name HAVING COUNT(T2.movie_id) > 10"
}
|
movie_platform
|
97
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "What's the cover image of the user who created the movie list 'Georgia related films'?",
"evidence": "Play it cool' is list_title; cover image of user refers to user_cover_image_url;"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT T1.user_cover_image_url FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_title LIKE 'Georgia related films'"
}
|
movie_platform
|
63
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "When did the creator of the list \"250 Favourite Films\" last updated a movie list?",
"evidence": "250 Favourite Films refers to list_title; last update refers to list_update_date_utc;"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT T2.list_update_date_utc FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T1.list_title = '250 Favourite Films' ORDER BY T2.list_update_date_utc DESC LIMIT 1"
}
|
movie_platform
|
82
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "What's the percentage of the users who have rated \"1\" on the movie \"When Will I Be Loved\"?",
"evidence": "When Will I Be Loved' is movie_title; rated 1 refers to rating_score = 1; percentage = Divide(Count(rating_id where rating_score = 1),Count(rating_id)) *100;"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT CAST(SUM(CASE WHEN T1.rating_score = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'When Will I Be Loved'"
}
|
movie_platform
|
139
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "Among the lists created in 2016, which is the list that was updated most recently.",
"evidence": "created in 2016 refers to list_creation_timestamp_utc like '2016%'; updated most recently refers to MAX(list_update_timestamp_utc)"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT list_title FROM lists WHERE strftime('%Y', list_update_timestamp_utc) = '2016' ORDER BY list_update_timestamp_utc DESC LIMIT 1"
}
|
movie_platform
|
53
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "Among the movie lists created after 2010/1/1, how many of them have over 200 followers?",
"evidence": "created after 2010/1/1 refers to list_update_timestamp_utc>'2010/1/1'; over 200 followers refers to list_followers>200;"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT COUNT(*) FROM lists WHERE list_followers > 200 AND list_update_timestamp_utc > '2010-01-01'"
}
|
movie_platform
|
144
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "For all list titles with at least 200 movies in the list, what is their average number of followers?",
"evidence": "at least 200 movies in the list refers to list_movie_number > 200; average number of followers refers to avg(list_followers)"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT AVG(list_followers) FROM lists WHERE list_movie_number > 200"
}
|
movie_platform
|
99
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "Please list the names of the movies that user 94978 scored as 5.",
"evidence": "user 94978 refers to user_id = 94978; scored as 5 refers to rating_score = 5;"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_score = 5 AND T1.user_id = 94978"
}
|
movie_platform
|
11
|
{
"db_schema": "CREATE TABLE lists\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(88260493,)`, `(45204418,)`, `(48905025,)` | Value Statics: Total count 79565 - Distinct count 22925 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null primary key,\n\tlist_title TEXT, -- Example Values: `('Films that made your kid sister cry',)`, `('Headscratchers',)`, `('Sexy Time Movies',)` | Value Statics: Total count 79565 - Distinct count 58898 - Null count 0 | Column Description: Name of the list \n\tlist_movie_number INTEGER, -- Example Values: `(5,)`, `(3,)`, `(7,)` | Value Statics: Total count 79565 - Distinct count 907 - Null count 0 | Column Description: Number of movies added to the list \n\tlist_update_timestamp_utc TEXT, -- Example Values: `('2019-01-24 19:16:18',)`, `('2018-12-03 15:12:20',)`, `('2019-05-30 03:00:07',)` | Value Statics: Total count 79565 - Distinct count 69576 - Null count 0 | Column Description: Last update timestamp for the list \n\tlist_creation_timestamp_utc TEXT, -- Example Values: `('2009-11-11 00:02:21',)`, `('2009-11-11 00:05:11',)`, `('2009-11-11 00:20:00',)` | Value Statics: Total count 79565 - Distinct count 79499 - Null count 0 | Column Description: Creation timestamp for the list \n\tlist_followers INTEGER, -- Example Values: `(5,)`, `(1,)`, `(6,)` | Value Statics: Total count 79565 - Distinct count 400 - Null count 0 | Column Description: Number of followers on the list \n\tlist_url TEXT, -- | Column Description: URL to the list page on Mubi \n\tlist_comments INTEGER, -- Example Values: `(3,)`, `(2,)`, `(5,)` | Value Statics: Total count 79565 - Distinct count 76 - Null count 0 | Column Description: Number of comments on the list \n\tlist_description TEXT, -- | Column Description: List description made by the user \n\tlist_cover_image_url TEXT, -- \n\tlist_first_image_url TEXT, -- \n\tlist_second_image_url TEXT, -- \n\tlist_third_image_url TEXT, -- \n);\n\nCREATE TABLE movies\n(\n\tmovie_id INTEGER not null primary key,\n\tmovie_title TEXT, -- Example Values: `('La Antena',)`, `('Elementary Particles',)`, `(\"It's Winter\",)` | Value Statics: Total count 100000 - Distinct count 91630 - Null count 0 | Column Description: Name of the movie \n\tmovie_release_year INTEGER, -- Example Values: `(2007,)`, `(2006,)`, `(2005,)` | Value Statics: Total count 99998 - Distinct count 135 - Null count 2 | Column Description: Release year of the movie \n\tmovie_url TEXT, -- Example Values: `('http://mubi.com/films/la-antena',)`, `('http://mubi.com/films/elementary-particles',)`, `('http://mubi.com/films/its-winter',)` | Value Statics: Total count 100000 - Distinct count 100000 - Null count 0 | Column Description: URL to the movie page on Mubi \n\tmovie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 | Column Description: By default, the title is in English. | Value Description: Only contains one value which is 'en'\n\tmovie_popularity INTEGER, -- Example Values: `(105,)`, `(23,)`, `(21,)` | Value Statics: Total count 100000 - Distinct count 1262 - Null count 0 | Column Description: Number of Mubi users who love this movie \n\tmovie_image_url TEXT, -- | Column Description: Image URL to the movie on Mubi \n\tdirector_id TEXT, -- Example Values: `('131',)`, `('73',)`, `('82',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: ID related to the movie director on Mubi \n\tdirector_name TEXT, -- Example Values: `('Esteban Sapir',)`, `('Oskar Roehler',)`, `('Rafi Pitts',)` | Value Statics: Total count 99997 - Distinct count 40150 - Null count 3 | Column Description: Full Name of the movie director \n\tdirector_url TEXT, -- Example Values: `('http://mubi.com/cast/esteban-sapir',)`, `('http://mubi.com/cast/oskar-roehler',)`, `('http://mubi.com/cast/rafi-pitts',)` | Value Statics: Total count 100000 - Distinct count 40206 - Null count 0 | Column Description: URL to the movie director page on Mubi \n);\n\nCREATE TABLE ratings_users\n(\n\tuser_id INTEGER references lists_users (user_id), -- Example Values: `(41579158,)`, `(68654088,)`, `(84114365,)` | Value Statics: Total count 100000 - Distinct count 44084 - Null count 0 | Column Description: ID related to the user rating the movie \n\trating_date_utc TEXT, -- Example Values: `('2017-06-10',)`, `('2012-10-02',)`, `('2010-12-25',)` | Value Statics: Total count 100000 - Distinct count 4143 - Null count 0 | Column Description: Rating date for the movie rating. | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a trialist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he rated the movie | Value Description: 1 = the user was a subscriber when he rated the movie 0 = the user was not a subscriber when he rated the movie\n\tuser_avatar_image_url TEXT, -- | Column Description: URL to the user profile image on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: URL to the user profile cover image on Mubi \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he rated the movie | Value Description: 1 = the user was eligible for trial when he rated the movie 0 = the user was not eligible for trial when he rated the movie\n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he rated the movie | Value Description: 1 = the user was a paying subscriber when he rated the movie 0 = the user was not a paying subscriber when he rated\n);\n\nCREATE TABLE lists_users\n(\n\tuser_id INTEGER not null, -- Example Values: `(2385,)`, `(15264,)`, `(15344,)` | Value Statics: Total count 80311 - Distinct count 23118 - Null count 0 | Column Description: ID related to the user who created the list. \n\tlist_id INTEGER not null, -- Example Values: `(192287,)`, `(192313,)`, `(192318,)` | Value Statics: Total count 80311 - Distinct count 80311 - Null count 0 | Column Description: ID of the list on Mubi \n\tlist_update_date_utc TEXT, -- Example Values: `('2019-11-26',)`, `('2020-05-01',)`, `('2020-04-12',)` | Value Statics: Total count 80311 - Distinct count 3801 - Null count 0 | Column Description: Last update date for the list | Value Description: YYYY-MM-DD\n\tlist_creation_date_utc TEXT, -- Example Values: `('2009-12-18',)`, `('2010-01-30',)`, `('2010-03-31',)` | Value Statics: Total count 80311 - Distinct count 3798 - Null count 0 | Column Description: Creation date for the list | Value Description: YYYY-MM-DD\n\tuser_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a tralist when he created the list | Value Description: 1 = the user was a trialist when he created the list 0 = the user was not a trialist when he created the list\n\tuser_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a subscriber when he created the list | Value Description: 1 = the user was a subscriber when he created the list 0 = the user was not a subscriber when he created the list\n\tuser_avatar_image_url TEXT, -- | Column Description: User profile image URL on Mubi \n\tuser_cover_image_url TEXT, -- | Column Description: User profile cover image URL on Mubi \n\tuser_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was eligible for trial when he created the list | Value Description: 1 = the user was eligible for trial when he created the list 0 = the user was not eligible for trial when he created the list\n\tuser_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 | Column Description: whether the user was a paying subscriber when he created the list | Value Description: 1 = the user was a paying subscriber when he created the list 0 = the user was not a paying subscriber when he created the list\n\tprimary key (user_id, list_id),\n\tforeign key (list_id) references lists(list_id),\n\tforeign key (user_id) references lists(user_id),\n);\n\nCREATE TABLE ratings\n(\n\tmovie_id INTEGER, -- Example Values: `(1066,)`, `(1067,)`, `(1068,)` | Value Statics: Total count 100000 - Distinct count 371 - Null count 0 | Column Description: Movie ID related to the rating \n\trating_id INTEGER, -- Example Values: `(15610495,)`, `(10704606,)`, `(10177114,)` | Value Statics: Total count 100000 - Distinct count 99999 - Null count 0 | Column Description: Rating ID on Mubi \n\trating_url TEXT, -- | Column Description: URL to the rating on Mubi \n\trating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 | Column Description: Rating score ranging from 1 (lowest) to 5 (highest) | Value Description: The score is proportional to the user's liking. The higher the score is, the more the user likes the movie\n\trating_timestamp_utc TEXT, -- Example Values: `('2017-06-10 12:38:33',)`, `('2014-08-15 23:42:31',)`, `('2014-01-30 13:21:57',)` | Value Statics: Total count 100000 - Distinct count 99962 - Null count 0 | Column Description: Timestamp for the movie rating made by the user on Mubi \n\tcritic TEXT, -- | Column Description: Critic made by the user rating the movie. | Value Description: If value = \"None\", the user did not write a critic when rating the movie.\n\tcritic_likes INTEGER, -- Example Values: `(0,)`, `(1,)`, `(2,)` | Value Statics: Total count 100000 - Distinct count 22 - Null count 0 | Column Description: Number of likes related to the critic made by the user rating the movie \n\tcritic_comments INTEGER, -- Example Values: `(0,)`, `(2,)`, `(1,)` | Value Statics: Total count 100000 - Distinct count 15 - Null count 0 | Column Description: Number of comments related to the critic made by the user rating the movie \n\tuser_id INTEGER, -- Example Values: `(41579158,)`, `(85981819,)`, `(4208563,)` | Value Statics: Total count 100000 - Distinct count 34674 - Null count 0 | Column Description: ID related to the user rating the movie \n\tuser_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 | Column Description: whether user was a tralist when he rated the movie | Value Description: 1 = the user was a trialist when he rated the movie 0 = the user was not a trialist when he rated the movie\n\tuser_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tuser_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 \n\tforeign key (movie_id) references movies(movie_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (user_id) references lists_users(user_id),\n\tforeign key (rating_id) references ratings(rating_id),\n\tforeign key (user_id) references ratings_users(user_id),\n\tforeign key (user_id) references ratings_users(user_id),\n);",
"question": "For all ratings which are rated in year 2020, name the movies which has the rating scored 4 and above.",
"evidence": "ratings in year 2020 refers to rating_timestamp_utc like '%2020%'; rating_score > = 4;"
}
|
{
"db_mode": "train",
"db_id": "movie_platform",
"gt_sql": "SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE CAST(SUBSTR(T1.rating_timestamp_utc, 1, 4) AS INTEGER) = 2020 AND CAST(SUBSTR(T1.rating_timestamp_utc, 6, 2) AS INTEGER) > 4"
}
|
book_publishing_company
|
203
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "What is the price of the book that sells the best?",
"evidence": "qty is abbreviation for quantity; sells the best mean with the most sales quantity; MAX(qty)"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T2.price FROM sales AS T1 INNER JOIN titles AS T2 ON T1.title_id = T2.title_id ORDER BY T1.qty DESC LIMIT 1"
}
|
book_publishing_company
|
202
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "In which city is the store with the highest total sales quantity located?",
"evidence": "qty is abbreviation for quantity; highest sales quantity refers to MAX(qty)"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T2.city FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id GROUP BY T2.city ORDER BY SUM(T1.qty) DESC LIMIT 1"
}
|
book_publishing_company
|
237
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Which title is about helpful hints on how to use your electronic resources, which publisher published it and what is the price of this book?",
"evidence": "publisher refers to pub_name; about the title refers to notes"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T1.title, T2.pub_name, T1.price FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.notes = 'Helpful hints on how to use your electronic resources to the best advantage.'"
}
|
book_publishing_company
|
200
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Please list the first names of the employees who work as Managing Editor.",
"evidence": "Managing Editor is a job description which refers to job_desc"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T1.fname FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T2.job_desc = 'Managing Editor'"
}
|
book_publishing_company
|
188
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "For each publisher, state the type of titles they published order by the publisher name.",
"evidence": "publisher name refers to pub_name"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT DISTINCT T2.pub_name, T1.type FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id ORDER BY T2.pub_name"
}
|
book_publishing_company
|
214
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Which type of book had the most pre-paid amount?",
"evidence": "most pre-paid amount refers to MAX(advance)"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT type FROM titles ORDER BY advance DESC LIMIT 1"
}
|
book_publishing_company
|
178
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Name the title and publisher for title ID BU 2075. Provide all the royalty percentage for all ranges.",
"evidence": "name the publisher refers to pub_name"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T1.title, T3.pub_name, T2.lorange, T2.hirange, T2.royalty FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id INNER JOIN publishers AS T3 ON T1.pub_id = T3.pub_id WHERE T1.title_id = 'BU2075'"
}
|
book_publishing_company
|
219
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Which publisher had the highest job level? Give his/her full name.",
"evidence": "highest job level refers to MAX(job_lvl)"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T1.fname, T1.minit, T1.lname FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id ORDER BY T1.job_lvl DESC LIMIT 1"
}
|
book_publishing_company
|
195
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Name all the authors for 'Sushi, Anyone?'.",
"evidence": "most year to date sales refers to MAX(ytd_sales); on contract refers to contract = 1; name of author = au_fname, au_lname"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T3.au_fname, T3.au_lname FROM titles AS T1 INNER JOIN titleauthor AS T2 ON T1.title_id = T2.title_id INNER JOIN authors AS T3 ON T2.au_id = T3.au_id WHERE T1.title = 'Sushi, Anyone?'"
}
|
book_publishing_company
|
231
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Which titles has above average royalty rate? Give those title's name, type and price?",
"evidence": "average royalty rate = DIVIDE(SUM(royalty), COUNT(title_id))"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT DISTINCT T1.title, T1.type, T1.price FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id WHERE T2.royalty > ( SELECT CAST(SUM(royalty) AS REAL) / COUNT(title_id) FROM roysched )"
}
|
book_publishing_company
|
201
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "What is the highest level of job to get to for the employee who got hired the earliest?",
"evidence": "highest job level refers to MAX(job_lvl); hired the earliest refers to MIN(hire_date)"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T2.max_lvl FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id ORDER BY T1.hire_date LIMIT 1"
}
|
book_publishing_company
|
238
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Of the titles, which title is about the Carefully researched study of the effects of strong emotions on the body, which state-based publisher published this book, and what is the year-to-date sale?",
"evidence": "year to date sales refers to ytd_sales; about the title refers to notes"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T1.title, T2.pub_name, T1.ytd_sales FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.notes = 'Carefully researched study of the effects of strong emotions on the body. Metabolic charts included.'"
}
|
book_publishing_company
|
229
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Among all the employees, how many percent more for the publishers than designers?",
"evidence": "publisher and designer are job descriptions which refers to job_desc; percentage more = 100*(SUBTRACT(SUM(CASE WHERE job_desc = 'publisher), SUM(CASE WHERE job_desc = 'designer'))"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT CAST(SUM(CASE WHEN T2.job_desc = 'publisher' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.job_desc = 'designer' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.job_id) FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id"
}
|
book_publishing_company
|
213
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Which one is the cheapest business book?",
"evidence": "business books refers to type = 'business'; cheapest book refers to MIN(price)"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT title FROM titles WHERE type = 'business' ORDER BY price LIMIT 1"
}
|
book_publishing_company
|
224
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Tell me about the information of the French publisher.",
"evidence": "French publisher means publisher in France where country = 'France'"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T1.pr_info FROM pub_info AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.country = 'France'"
}
|
book_publishing_company
|
167
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Which date has the most ordered quantity? What is the total order quantity on that day?",
"evidence": "total quantity refers to qty; most ordered quantity refers to order with the highest quantity where MAX(sum(qty))"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT ord_date, SUM(qty) FROM sales GROUP BY ord_date ORDER BY SUM(qty) DESC LIMIT 1"
}
|
book_publishing_company
|
233
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "List the title name, type, and price of the titles published by New Moon Books. Arrange the list in ascending order of price.",
"evidence": "Eric the Read Books is a publisher which refers to pub_name;"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T1.title, T1.type, T1.price FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.pub_name = 'New Moon Books' ORDER BY T1.price"
}
|
book_publishing_company
|
170
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "What is the title that have at least 10% royalty without minimum range amount.",
"evidence": "at least 10% royalty refers to royalty > = 10; minimum range is synonym for low range which refers to lorange; without minimum range amount refers to lorange <> 0"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T1.title FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id WHERE T2.lorange = 0 AND T2.royalty >= 10"
}
|
book_publishing_company
|
225
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "What's the publisher of the book \"Silicon Valley Gastronomic Treats\"? Give the publisher's name.",
"evidence": "publisher name refers to pub_name; Silicon Valley Gastronomic Treats is the title of a book"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T2.pub_name FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.title = 'Silicon Valley Gastronomic Treats'"
}
|
book_publishing_company
|
179
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Name the store with ID 7066 and calculate the percentage of the the quantity ordered that were on 'Net 30' payment terms.",
"evidence": "store with ID 7066 refers to stor_ID = '7066'; 'Net 60' payment terms refers to payterm = 'Net 60'; qty is abbreviation for quantity; percentage = DIVIDE(payterms = 'Net 60', sum(qty))*100"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T2.stor_name , CAST(SUM(CASE WHEN payterms = 'Net 30' THEN qty ELSE 0 END) AS REAL) * 100 / SUM(qty) FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id WHERE T1.stor_id = '7066' GROUP BY T2.stor_name"
}
|
book_publishing_company
|
218
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Is the author of \"Sushi, Anyone?\" on the contract?",
"evidence": "contract = 1 means on contract; contract = 0 means not on contract"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T1.contract FROM authors AS T1 INNER JOIN titleauthor AS T2 ON T1.au_id = T2.au_id INNER JOIN titles AS T3 ON T2.title_id = T3.title_id WHERE T3.title = 'Sushi, Anyone?'"
}
|
book_publishing_company
|
186
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Who are the employees working for publisher not located in USA? State the employee's name and publisher name.",
"evidence": "not located at USA refers to country! = 'USA'"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T1.fname, T1.lname, T2.pub_name FROM employee AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.country != 'USA'"
}
|
book_publishing_company
|
174
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "State the royalty percentage for the most year to date sale title within the 20000 range.",
"evidence": "most year to date sales refers to MAX(ytd_sales); range limit means high range which refers to hirange; the 20000 range refers to hirange<20000"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT MAX(T1.ytd_sales) FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id WHERE T2.lorange > 20000 AND T2.hirange < 20000"
}
|
book_publishing_company
|
169
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "List the title, price and publication date for all sales with 'ON invoice' payment terms.",
"evidence": "publication date refers to pubdate; payment terms refers to payterms; payterms = 'ON invoice'"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T2.title, T2.price, T2.pubdate FROM sales AS T1 INNER JOIN titles AS T2 ON T1.title_id = T2.title_id WHERE T1.payterms = 'ON invoice'"
}
|
book_publishing_company
|
209
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Please give more detailed information about the first three books that sell the best.",
"evidence": "qty is abbreviation for quantity; sells the best mean with the most sales quantity; MAX(qty)"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T1.notes FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id ORDER BY T2.qty DESC LIMIT 3"
}
|
book_publishing_company
|
211
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "What is the average quantity of each order for the book \"Life Without Fear\"?",
"evidence": "qty is abbreviation for quantity; average quantity order = AVG(qty)"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT CAST(SUM(T2.qty) AS REAL) / COUNT(T1.title_id) FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id WHERE T1.title = 'Life Without Fear'"
}
|
book_publishing_company
|
183
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "In which year has the most hired employees?",
"evidence": "most hired employees refers to MAX(count(emp_id))"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT STRFTIME('%Y', hire_date) FROM employee GROUP BY STRFTIME('%Y', hire_date) ORDER BY COUNT(emp_id) DESC LIMIT 1"
}
|
book_publishing_company
|
180
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "State the publisher name for publisher ID 877? Calculate its average year to date sales.",
"evidence": "publisher id refers to pub_id; publisher name refers to pub_name; average year to date sales = AVG(ytd_sales)"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T2.pub_name, AVG(T1.ytd_sales) FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.pub_id = '0877' GROUP BY T2.pub_name"
}
|
book_publishing_company
|
234
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "In the books published by US publishers, which book has the highest royalty? List these books in the descending order of royalty.",
"evidence": "US publisher refers publisher in the US where country = 'USA';"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T1.title FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id INNER JOIN roysched AS T3 ON T1.title_id = T3.title_id WHERE T2.country = 'USA' ORDER BY T1.royalty DESC"
}
|
book_publishing_company
|
208
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Among the publishers in the USA, how many of them have published books that are over $15?",
"evidence": "are over $15 refers to price>15"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT COUNT(DISTINCT T1.pub_id) FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.country = 'USA' AND T1.price > 15"
}
|
book_publishing_company
|
216
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Which job level is O'Rourke at?",
"evidence": "job level refers to job_lvl"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT job_lvl FROM employee WHERE lname = 'O''Rourke'"
}
|
book_publishing_company
|
239
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Name the top five titles that sold more than average and list them in descending order of the number of sales in California stores?",
"evidence": "qty is abbreviation for quantity; sold more than average refers to qty > AVG(qty); california refers to state = 'CA\""
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T1.title FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id INNER JOIN publishers AS T3 ON T1.pub_id = T3.pub_id WHERE T2.qty > ( SELECT CAST(SUM(qty) AS REAL) / COUNT(title_id) FROM sales ) AND T3.state = 'CA' ORDER BY T2.qty DESC LIMIT 5"
}
|
book_publishing_company
|
221
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "How many levels are there left for Diego W Roel to reach if he/she could go to the max level for his/her position?",
"evidence": "max level for his position refers to max_lvl; job level refers to job_lvl; level left to reach the max = SUBTRACT(max_lvl, job_lvl)"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T2.max_lvl - T1.job_lvl FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.fname = 'Diego' AND T1.minit = 'W' AND T1.lname = 'Roel'"
}
|
book_publishing_company
|
189
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Name the publisher which has the most titles published in 1991.",
"evidence": "most title published refers to MAX(count(title_id); published in 1991 refers to YEAR(pubdate) = 1991"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T2.pub_name FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE STRFTIME('%Y', T1.pubdate) = '1991' GROUP BY T1.pub_id, T2.pub_name ORDER BY COUNT(T1.title_id) DESC LIMIT 1"
}
|
book_publishing_company
|
206
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "In which country is the publisher of the book \"Life Without Fear\" located?",
"evidence": "Life Without Fear is book title"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T2.country FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.title = 'Life Without Fear'"
}
|
book_publishing_company
|
220
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "What's Pedro S Afonso's job title?",
"evidence": "job title means job description which refers to job_desc"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T2.job_desc FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.fname = 'Pedro' AND T1.minit = 'S' AND T1.lname = 'Afonso'"
}
|
book_publishing_company
|
215
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "What's the royalty for the bestseller book?",
"evidence": "qty is abbreviation for quantity; bestseller means with the most sales quantity; MAX(qty)"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT royalty FROM titles ORDER BY ytd_sales DESC LIMIT 1"
}
|
book_publishing_company
|
191
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Among all employees, who have job level greater than 200. State the employee name and job description.",
"evidence": "job level greater than 200 refers to job_lvl>200; job description refers to job_desc"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T1.fname, T1.lname, T2.job_desc FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.job_lvl > 200"
}
|
book_publishing_company
|
204
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Please list the stores that ordered the book \"Life Without Fear\".",
"evidence": "store name refers to stor_name"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT T2.stor_name FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id INNER JOIN titles AS T3 ON T1.title_id = T3.title_id WHERE T3.title = 'Life Without Fear'"
}
|
book_publishing_company
|
196
|
{
"db_schema": "CREATE TABLE authors\n(\n\tau_id TEXT primary key,\n\tau_lname TEXT not null, -- Example Values: `('White',)`, `('Green',)`, `('Carson',)` | Value Statics: Total count 23 - Distinct count 22 - Null count 0 | Column Name Meaning: author last name | Column Description: author last name \n\tau_fname TEXT not null, -- Example Values: `('Johnson',)`, `('Marjorie',)`, `('Cheryl',)` | Value Statics: Total count 23 - Distinct count 23 - Null count 0 | Column Name Meaning: author first name | Column Description: author first name \n\tphone TEXT not null, -- Example Values: `('408 496-7223',)`, `('415 986-7020',)`, `('415 548-7723',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: phone number \n\taddress TEXT, -- Example Values: `('10932 Bigge Rd.',)`, `('309 63rd St. #411',)`, `('589 Darwin Ln.',)` | Value Statics: Total count 23 - Distinct count 21 - Null count 0 | Column Description: address \n\tcity TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 | Column Description: state \n\tzip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 | Column Description: zip code \n\tcontract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 | Column Description: contract status | Value Description: 0: not on the contract 1: on the contract\n);\n\nCREATE TABLE jobs\n(\n\tjob_id INTEGER primary key,\n\tjob_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 | Column Name Meaning: job description | Column Description: job description | Value Description: staff should be mentioned\n\tmin_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 | Column Name Meaning: min level | Column Description: min job level \n\tmax_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 | Column Name Meaning: max level | Column Description: max job level | Value Description: level range for jobs mentioned in job_desc is (min_lvl, max_lvl)\n);\n\nCREATE TABLE publishers\n(\n\tpub_id TEXT primary key,\n\tpub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher name | Column Description: publisher name \n\tcity TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 | Column Description: state \n\tcountry TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 | Column Description: country \n);\n\nCREATE TABLE employee\n(\n\temp_id TEXT primary key,\n\tfname TEXT not null, -- Example Values: `('Aria',)`, `('Annette',)`, `('Ann',)` | Value Statics: Total count 43 - Distinct count 42 - Null count 0 | Column Name Meaning: first name | Column Description: first name of employees \n\tminit TEXT, -- Example Values: `('',)`, `('M',)`, `('R',)` | Value Statics: Total count 43 - Distinct count 20 - Null count 0 | Column Description: middle name \n\tlname TEXT not null, -- Example Values: `('Cruz',)`, `('Roulet',)`, `('Devon',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Name Meaning: last name | Column Description: last name \n\tjob_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 | Column Name Meaning: job id | Column Description: number identifying jobs \n\tjob_lvl INTEGER, -- Example Values: `(87,)`, `(152,)`, `(200,)` | Value Statics: Total count 43 - Distinct count 31 - Null count 0 | Column Name Meaning: job level | Column Description: job level | Value Description: higher value means job level is higher\n\tpub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 | Column Name Meaning: publisher id | Column Description: id number identifying publishers \n\thire_date DATETIME not null, -- Example Values: `('1991-10-26 00:00:00.0',)`, `('1990-02-21 00:00:00.0',)`, `('1991-07-16 00:00:00.0',)` | Value Statics: Total count 43 - Distinct count 43 - Null count 0 | Column Description: hire date \n\tforeign key (job_id) references jobs(job_id) on update cascade on delete cascade,\n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE pub_info\n(\n\tpub_id TEXT primary key,\n\tlogo BLOB, -- Example Values: `0x4749463839618B002F00B30F000000008000000080008080`, `0x474946383961C2001D00B30F000000008000000080008080`, `0x474946383961F5003400B30F000000008000000080008080`, `0x474946383961E3002500B30F000000008000000080008080`, `0x4749463839615D002200B30F000000008000000080008080` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Description: logo of publications \n\tpr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, pub`, `This is sample text data for Algodata Infosystems,`, `This is sample text data for Five Lakes Publishing`, `This is sample text data for Ramona Publishers, pu`, `This is sample text data for GGG&G, publisher 9901` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 | Column Name Meaning: publisher's information | Column Description: publisher's information \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE stores\n(\n\tstor_id TEXT primary key,\n\tstor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store name \n\tstor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Name Meaning: store address \n\tcity TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: city name \n\tstate TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 | Column Description: state code \n\tzip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 | Column Description: zip code \n);\n\nCREATE TABLE discounts\n(\n\tdiscounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Name Meaning: discount type | Column Description: discount type \n\tstor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: store id | Column Description: store id \n\tlowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: low quantity | Column Description: low quantity (quantity floor) | Value Description: The minimum quantity to enjoy the discount\n\thighqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 | Column Name Meaning: high quantity | Column Description: high quantity (max quantity) | Value Description: The maximum quantity to enjoy the discount\n\tdiscount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 | Column Description: discount \n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titles\n(\n\ttitle_id TEXT primary key,\n\ttitle TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Shee`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 | Column Description: title \n\ttype TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 | Column Description: type of titles \n\tpub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 | Column Name Meaning: publisher id | Column Description: publisher id \n\tprice REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 | Column Description: price \n\tadvance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 | Column Description: pre-paid amount \n\troyalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 | Column Description: royalty \n\tytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 | Column Name Meaning: year to date sales | Column Description: year to date sales \n\tnotes TEXT, -- Example Values: `An overview of available database systems with emp`, `Helpful hints on how to use your electronic resour`, `The latest medical and psychological techniques fo`, `Annotated analysis of what computers can do for yo`, `Favorite recipes for quick, easy, and elegant meal` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 | Column Description: notes if any | Value Description: had better understand notes contents and put some of them into questions if any\n\tpubdate DATETIME not null, -- Example Values: `('1991-06-12 00:00:00.0',)`, `('1991-06-09 00:00:00.0',)`, `('1991-06-30 00:00:00.0',)` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 | Column Name Meaning: publication date | Column Description: publication date \n\tforeign key (pub_id) references publishers(pub_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE roysched\n(\n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 | Column Description: unique id number identifying title \n\tlorange INTEGER, -- Example Values: `(0,)`, `(5001,)`, `(2001,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: low range | Column Description: low range \n\thirange INTEGER, -- Example Values: `(5000,)`, `(50000,)`, `(2000,)` | Value Statics: Total count 86 - Distinct count 22 - Null count 0 | Column Name Meaning: high range | Column Description: high range \n\troyalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 | Column Description: royalty \n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE sales\n(\n\tstor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 | Column Name Meaning: store id | Column Description: id number identifying stores \n\tord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: order number | Column Description: id number identifying the orders \n\tord_date DATETIME not null, -- Example Values: `('1994-09-14 00:00:00.0',)`, `('1994-09-13 00:00:00.0',)`, `('1993-05-24 00:00:00.0',)` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 | Column Name Meaning: order date | Column Description: the date of the order \n\tqty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 | Column Name Meaning: quantity | Column Description: quantity of sales \n\tpayterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 | Column Description: payments \n\ttitle_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 | Column Name Meaning: title id | Column Description: id number identifying titles \n\tprimary key (stor_id, ord_num, title_id),\n\tforeign key (stor_id) references stores(stor_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles(title_id) on update cascade on delete cascade,\n);\n\nCREATE TABLE titleauthor\n(\n\tau_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 | Column Name Meaning: author id | Column Description: author id \n\ttitle_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 | Column Name Meaning: title id | Column Description: title id \n\tau_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 | Column Name Meaning: author ordering | Column Description: author ordering \n\troyaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 | Column Description: royaltyper \n\tprimary key (au_id, title_id),\n\tforeign key (au_id) references authors(au_id) on update cascade on delete cascade,\n\tforeign key (title_id) references titles (title_id) on update cascade on delete cascade,\n);",
"question": "Calculate the percentage of the employees who are Editor or Designer?",
"evidence": "Editor or Auditor are job description which refers to job_desc; percentage = DIVIDE(count(job_desc = 'Editor' or job_desc = 'Auditor'), count(emp_id))*100"
}
|
{
"db_mode": "train",
"db_id": "book_publishing_company",
"gt_sql": "SELECT CAST(SUM(CASE WHEN T2.job_desc IN ('Editor', 'Designer') THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.job_id) FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id"
}
|
retail_complains
|
372
|
{
"db_schema": "CREATE TABLE state\n(\n\tStateCode TEXT constraint state_pk primary key,\n\tState TEXT, -- Example Values: `('Alabama',)`, `('Arkansas',)`, `('Arizona',)` | Value Statics: Total count 48 - Distinct count 48 - Null count 0 \n\tRegion TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0 \n);\n\nCREATE TABLE callcenterlogs\n(\n\t\"Date received\" DATE, -- Example Values: `('2017-03-27',)`, `('2017-03-23',)`, `('2017-03-22',)` | Value Statics: Total count 3999 - Distinct count 1842 - Null count 0 | Column Description: complaint date \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000175',)` | Value Statics: Total count 2504 - Distinct count 2504 - Null count 1495 | Column Description: unique id number representing each complaint \n\t\"rand client\" TEXT, -- Example Values: `('C00004587',)`, `('C00003328',)`, `('C00001685',)` | Value Statics: Total count 2504 - Distinct count 2019 - Null count 1495 | Column Description: client id \n\tphonefinal TEXT, -- Example Values: `('977-806-9726',)`, `('322-598-7152',)`, `('508-311-5237',)` | Value Statics: Total count 3999 - Distinct count 2744 - Null count 0 | Column Name Meaning: phone final | Column Description: final phone number \n\t\"vru+line\" TEXT, -- Example Values: `('AA0103',)`, `('AA0205',)`, `('AA0110',)` | Value Statics: Total count 3015 - Distinct count 27 - Null count 984 | Column Name Meaning: voice response unit line | Column Description: voice response unit line \n\tcall_id INTEGER, -- Example Values: `(34536,)`, `(34537,)`, `(34538,)` | Value Statics: Total count 3015 - Distinct count 3015 - Null count 984 | Column Name Meaning: call id | Column Description: id number identifying the call \n\tpriority INTEGER, -- Example Values: `0`, `2`, `1` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: priority of the complaint | Value Description: 0, 1, 2, null: not available, higher: -> higher priority, -> more serious/urgent complaint\n\ttype TEXT, -- Example Values: `NW`, `PS`, `NE`, `TT`, `IN` | Value Statics: Total count 3015 - Distinct count 6 - Null count 984 | Column Description: type of complaint \n\toutcome TEXT, -- Example Values: `AGENT`, `HANG`, `PHANTOM` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: the outcome of processing of complaints \n\tserver TEXT, -- Example Values: `('MICHAL',)`, `('TOVA',)`, `('YIFAT',)` | Value Statics: Total count 3015 - Distinct count 25 - Null count 984 | Column Description: server \n\tser_start TEXT, -- Example Values: `('13:34:11',)`, `('10:58:22',)`, `('13:00:54',)` | Value Statics: Total count 3999 - Distinct count 3733 - Null count 0 | Column Name Meaning: server start | Column Description: server start time | Value Description: HH:MM:SS\n\tser_exit TEXT, -- Example Values: `('13:40:23',)`, `('11:16:10',)`, `('13:13:31',)` | Value Statics: Total count 3999 - Distinct count 3738 - Null count 0 | Column Name Meaning: server exit | Column Description: server exit time \n\tser_time TEXT, -- Example Values: `('00:06:12',)`, `('00:17:48',)`, `('00:12:37',)` | Value Statics: Total count 3999 - Distinct count 1303 - Null count 0 | Column Name Meaning: server time | Column Description: server time | Value Description: longer server time referring to more verbose/longer complaint\n\tprimary key (\"Complaint ID\"),\n\tforeign key (\"rand client\") references client(client_id),\n);\n\nCREATE TABLE client\n(\n\tclient_id TEXT primary key,\n\tsex TEXT, -- Example Values: `Female`, `Male` | Value Statics: Total count 5369 - Distinct count 2 - Null count 0 | Column Description: sex of client \n\tday INTEGER, -- Example Values: `(13,)`, `(4,)`, `(9,)` | Value Statics: Total count 5369 - Distinct count 31 - Null count 0 | Column Description: day of the birthday \n\tmonth INTEGER, -- Example Values: `12`, `2`, `10`, `7`, `9` | Value Statics: Total count 5369 - Distinct count 12 - Null count 0 | Column Description: month of the birthday \n\tyear INTEGER, -- Example Values: `(1990,)`, `(1965,)`, `(1960,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: year when is born \n\tage INTEGER, -- Example Values: `(29,)`, `(54,)`, `(59,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: age | Value Description: teenager: 13-19 adult: 19-65 elder: > 65\n\tsocial TEXT, -- Example Values: `('926-93-2157',)`, `('806-94-5725',)`, `('614-70-9100',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: social number | Value Description: ssn: us id number for each person\n\tfirst TEXT, -- Example Values: `('Emma',)`, `('Noah',)`, `('Olivia',)` | Value Statics: Total count 5369 - Distinct count 2885 - Null count 0 | Column Description: first name \n\tmiddle TEXT, -- Example Values: `('Avaya',)`, `('Everest',)`, `('Brooklynne',)` | Value Statics: Total count 5369 - Distinct count 3925 - Null count 0 | Column Description: middle name \n\tlast TEXT, -- Example Values: `('Smith',)`, `('Thompson',)`, `('Johnson',)` | Value Statics: Total count 5369 - Distinct count 1769 - Null count 0 | Column Description: last name \n\tphone TEXT, -- Example Values: `('367-171-6840',)`, `('212-423-7734',)`, `('212-425-6932',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: phone number \n\temail TEXT, -- Example Values: `('emma.smith@gmail.com',)`, `('noah.thompson@gmail.com',)`, `('olivia.johnson@outlook.com',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: email | Value Description: google email / account: @gamil.com microsoft email / account: xxx@outlook.com\n\taddress_1 TEXT, -- Example Values: `('387 Wellington Ave.',)`, `('75 W. Berkshire St.',)`, `('36 Second St.',)` | Value Statics: Total count 5369 - Distinct count 5365 - Null count 0 | Column Description: address 1 \n\taddress_2 TEXT, -- Example Values: `('Unit 1',)`, `('Unit 6',)`, `('Unit 80',)` | Value Statics: Total count 83 - Distinct count 24 - Null count 5286 | Column Description: address 2 | Value Description: entire address = (address_1, address_2)\n\tcity TEXT, -- Example Values: `('Albuquerque',)`, `('New York City',)`, `('Indianapolis',)` | Value Statics: Total count 5369 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `('NM',)`, `('NY',)`, `('IN',)` | Value Statics: Total count 5369 - Distinct count 51 - Null count 0 | Column Description: state code \n\tzipcode INTEGER, -- Example Values: `(47246,)`, `(10040,)`, `(10162,)` | Value Statics: Total count 5369 - Distinct count 3512 - Null count 0 | Column Description: zipcode \n\tdistrict_id INTEGER, -- Example Values: `(18,)`, `(1,)`, `(5,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Name Meaning: district id | Column Description: district id number \n\tforeign key (district_id) references district(district_id),\n);\n\nCREATE TABLE district\n(\n\tdistrict_id INTEGER primary key,\n\tcity TEXT, -- Example Values: `('New York City',)`, `('Jacksonville',)`, `('Columbus',)` | Value Statics: Total count 77 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate_abbrev TEXT, -- Example Values: `('NY',)`, `('FL',)`, `('OH',)` | Value Statics: Total count 77 - Distinct count 51 - Null count 0 | Column Description: state abbreviated code \n\tdivision TEXT, -- Example Values: `Middle Atlantic`, `South Atlantic`, `East North Central`, `Pacific`, `Mountain` | Value Statics: Total count 77 - Distinct count 9 - Null count 0 | Column Description: division \n\tforeign key (state_abbrev) references state(StateCode),\n);\n\nCREATE TABLE events\n(\n\t\"Date received\" DATE, -- Example Values: `('2014-07-03',)`, `('2012-04-12',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1908 - Null count 0 | Column Description: Date received \n\tProduct TEXT, -- Example Values: `Bank account or service`, `Credit card` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: complaining about which product \n\t\"Sub-product\" TEXT, -- Example Values: `Checking account`, `Savings account`, `Other bank product/service`, `(CD) Certificate of deposit`, `Cashing a check without an account` | Value Statics: Total count 14091 - Distinct count 5 - Null count 9328 | Column Description: sub product if exists | Value Description: detailed product\n\tIssue TEXT, -- Example Values: `('Deposits and withdrawals',)`, `('Account opening, closing, or management',)`, `('Billing disputes',)` | Value Statics: Total count 23419 - Distinct count 38 - Null count 0 | Column Description: problems leading to this complaints \n\t\"Sub-issue\" TEXT, -- | Column Description: sub problems leading to this complaints if exists | Value Description: more detailed issue\n\t\"Consumer complaint narrative\" TEXT, -- | Column Description: Consumer complaint narrative \n\tTags TEXT, -- Example Values: `Older American`, `Older American, Servicemember`, `Servicemember` | Value Statics: Total count 3276 - Distinct count 3 - Null count 20143 | Column Description: tags of client \n\t\"Consumer consent provided?\" TEXT, -- Example Values: `N/A`, `Consent not provided`, `Consent provided`, `Other` | Value Statics: Total count 23323 - Distinct count 4 - Null count 96 | Column Name Meaning: Tags Consumer consent provided? | Column Description: whether the tags labeled under permission of the clients | Value Description: null, 'N/A' or empty value: indicating that the company didn't get the permission of consent. if the value is not empty: customers provide the consent for this tag.\n\t\"Submitted via\" TEXT, -- Example Values: `Email`, `Fax`, `Postal mail`, `Referral`, `Web` | Value Statics: Total count 23419 - Distinct count 6 - Null count 0 | Column Description: Submitted via \n\t\"Date sent to company\" TEXT, -- Example Values: `('2014-07-09',)`, `('2012-04-13',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1778 - Null count 0 | Column Description: Date sent to company | Value Description: delay of the complaints = 'Date sent to company'\n\t\"Company response to consumer\" TEXT, -- Example Values: `Closed with explanation`, `Closed with relief`, `Closed without relief`, `Closed with non-monetary relief`, `In progress` | Value Statics: Total count 23419 - Distinct count 8 - Null count 0 | Column Description: Company response to consumer \n\t\"Timely response?\" TEXT, -- Example Values: `Yes`, `No` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: whether the response of the company is timely \n\t\"Consumer disputed?\" TEXT, -- Example Values: `No`, `Yes` | Value Statics: Total count 22417 - Distinct count 2 - Null count 1002 | Column Description: whether the consumer dispute about the response from the company. \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000140',)` | Value Statics: Total count 23419 - Distinct count 23419 - Null count 0 | Column Description: id number indicating which complaint \n\tClient_ID TEXT, -- Example Values: `('C00003714',)`, `('C00001366',)`, `('C00002330',)` | Value Statics: Total count 23419 - Distinct count 5284 - Null count 0 | Column Name Meaning: Client ID | Column Description: id number indicating which client \n\tprimary key (\"Complaint ID\", Client_ID),\n\tforeign key (\"Complaint ID\") references callcenterlogs(\"Complaint ID\"),\n\tforeign key (Client_ID) references client(client_id),\n);\n\nCREATE TABLE reviews\n(\n\t\"Date\" DATE primary key,\n\tStars INTEGER, -- Example Values: `5`, `1`, `2` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tReviews TEXT, -- \n\tProduct TEXT, -- Example Values: `Eagle National Mortgage`, `Eagle National Bank`, `Eagle Capital` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tdistrict_id INTEGER, -- Example Values: `(65,)`, `(66,)`, `(23,)` | Value Statics: Total count 377 - Distinct count 77 - Null count 0 \n\tforeign key (district_id) references district(district_id),\n);",
"question": "Give me the social number and state of the client whose phone number is 100-121-8371.",
"evidence": "social number refers to social"
}
|
{
"db_mode": "train",
"db_id": "retail_complains",
"gt_sql": "SELECT T1.social, T1.state FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T1.phone = '100-121-8371'"
}
|
retail_complains
|
258
|
{
"db_schema": "CREATE TABLE state\n(\n\tStateCode TEXT constraint state_pk primary key,\n\tState TEXT, -- Example Values: `('Alabama',)`, `('Arkansas',)`, `('Arizona',)` | Value Statics: Total count 48 - Distinct count 48 - Null count 0 \n\tRegion TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0 \n);\n\nCREATE TABLE callcenterlogs\n(\n\t\"Date received\" DATE, -- Example Values: `('2017-03-27',)`, `('2017-03-23',)`, `('2017-03-22',)` | Value Statics: Total count 3999 - Distinct count 1842 - Null count 0 | Column Description: complaint date \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000175',)` | Value Statics: Total count 2504 - Distinct count 2504 - Null count 1495 | Column Description: unique id number representing each complaint \n\t\"rand client\" TEXT, -- Example Values: `('C00004587',)`, `('C00003328',)`, `('C00001685',)` | Value Statics: Total count 2504 - Distinct count 2019 - Null count 1495 | Column Description: client id \n\tphonefinal TEXT, -- Example Values: `('977-806-9726',)`, `('322-598-7152',)`, `('508-311-5237',)` | Value Statics: Total count 3999 - Distinct count 2744 - Null count 0 | Column Name Meaning: phone final | Column Description: final phone number \n\t\"vru+line\" TEXT, -- Example Values: `('AA0103',)`, `('AA0205',)`, `('AA0110',)` | Value Statics: Total count 3015 - Distinct count 27 - Null count 984 | Column Name Meaning: voice response unit line | Column Description: voice response unit line \n\tcall_id INTEGER, -- Example Values: `(34536,)`, `(34537,)`, `(34538,)` | Value Statics: Total count 3015 - Distinct count 3015 - Null count 984 | Column Name Meaning: call id | Column Description: id number identifying the call \n\tpriority INTEGER, -- Example Values: `0`, `2`, `1` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: priority of the complaint | Value Description: 0, 1, 2, null: not available, higher: -> higher priority, -> more serious/urgent complaint\n\ttype TEXT, -- Example Values: `NW`, `PS`, `NE`, `TT`, `IN` | Value Statics: Total count 3015 - Distinct count 6 - Null count 984 | Column Description: type of complaint \n\toutcome TEXT, -- Example Values: `AGENT`, `HANG`, `PHANTOM` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: the outcome of processing of complaints \n\tserver TEXT, -- Example Values: `('MICHAL',)`, `('TOVA',)`, `('YIFAT',)` | Value Statics: Total count 3015 - Distinct count 25 - Null count 984 | Column Description: server \n\tser_start TEXT, -- Example Values: `('13:34:11',)`, `('10:58:22',)`, `('13:00:54',)` | Value Statics: Total count 3999 - Distinct count 3733 - Null count 0 | Column Name Meaning: server start | Column Description: server start time | Value Description: HH:MM:SS\n\tser_exit TEXT, -- Example Values: `('13:40:23',)`, `('11:16:10',)`, `('13:13:31',)` | Value Statics: Total count 3999 - Distinct count 3738 - Null count 0 | Column Name Meaning: server exit | Column Description: server exit time \n\tser_time TEXT, -- Example Values: `('00:06:12',)`, `('00:17:48',)`, `('00:12:37',)` | Value Statics: Total count 3999 - Distinct count 1303 - Null count 0 | Column Name Meaning: server time | Column Description: server time | Value Description: longer server time referring to more verbose/longer complaint\n\tprimary key (\"Complaint ID\"),\n\tforeign key (\"rand client\") references client(client_id),\n);\n\nCREATE TABLE client\n(\n\tclient_id TEXT primary key,\n\tsex TEXT, -- Example Values: `Female`, `Male` | Value Statics: Total count 5369 - Distinct count 2 - Null count 0 | Column Description: sex of client \n\tday INTEGER, -- Example Values: `(13,)`, `(4,)`, `(9,)` | Value Statics: Total count 5369 - Distinct count 31 - Null count 0 | Column Description: day of the birthday \n\tmonth INTEGER, -- Example Values: `12`, `2`, `10`, `7`, `9` | Value Statics: Total count 5369 - Distinct count 12 - Null count 0 | Column Description: month of the birthday \n\tyear INTEGER, -- Example Values: `(1990,)`, `(1965,)`, `(1960,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: year when is born \n\tage INTEGER, -- Example Values: `(29,)`, `(54,)`, `(59,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: age | Value Description: teenager: 13-19 adult: 19-65 elder: > 65\n\tsocial TEXT, -- Example Values: `('926-93-2157',)`, `('806-94-5725',)`, `('614-70-9100',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: social number | Value Description: ssn: us id number for each person\n\tfirst TEXT, -- Example Values: `('Emma',)`, `('Noah',)`, `('Olivia',)` | Value Statics: Total count 5369 - Distinct count 2885 - Null count 0 | Column Description: first name \n\tmiddle TEXT, -- Example Values: `('Avaya',)`, `('Everest',)`, `('Brooklynne',)` | Value Statics: Total count 5369 - Distinct count 3925 - Null count 0 | Column Description: middle name \n\tlast TEXT, -- Example Values: `('Smith',)`, `('Thompson',)`, `('Johnson',)` | Value Statics: Total count 5369 - Distinct count 1769 - Null count 0 | Column Description: last name \n\tphone TEXT, -- Example Values: `('367-171-6840',)`, `('212-423-7734',)`, `('212-425-6932',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: phone number \n\temail TEXT, -- Example Values: `('emma.smith@gmail.com',)`, `('noah.thompson@gmail.com',)`, `('olivia.johnson@outlook.com',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: email | Value Description: google email / account: @gamil.com microsoft email / account: xxx@outlook.com\n\taddress_1 TEXT, -- Example Values: `('387 Wellington Ave.',)`, `('75 W. Berkshire St.',)`, `('36 Second St.',)` | Value Statics: Total count 5369 - Distinct count 5365 - Null count 0 | Column Description: address 1 \n\taddress_2 TEXT, -- Example Values: `('Unit 1',)`, `('Unit 6',)`, `('Unit 80',)` | Value Statics: Total count 83 - Distinct count 24 - Null count 5286 | Column Description: address 2 | Value Description: entire address = (address_1, address_2)\n\tcity TEXT, -- Example Values: `('Albuquerque',)`, `('New York City',)`, `('Indianapolis',)` | Value Statics: Total count 5369 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `('NM',)`, `('NY',)`, `('IN',)` | Value Statics: Total count 5369 - Distinct count 51 - Null count 0 | Column Description: state code \n\tzipcode INTEGER, -- Example Values: `(47246,)`, `(10040,)`, `(10162,)` | Value Statics: Total count 5369 - Distinct count 3512 - Null count 0 | Column Description: zipcode \n\tdistrict_id INTEGER, -- Example Values: `(18,)`, `(1,)`, `(5,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Name Meaning: district id | Column Description: district id number \n\tforeign key (district_id) references district(district_id),\n);\n\nCREATE TABLE district\n(\n\tdistrict_id INTEGER primary key,\n\tcity TEXT, -- Example Values: `('New York City',)`, `('Jacksonville',)`, `('Columbus',)` | Value Statics: Total count 77 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate_abbrev TEXT, -- Example Values: `('NY',)`, `('FL',)`, `('OH',)` | Value Statics: Total count 77 - Distinct count 51 - Null count 0 | Column Description: state abbreviated code \n\tdivision TEXT, -- Example Values: `Middle Atlantic`, `South Atlantic`, `East North Central`, `Pacific`, `Mountain` | Value Statics: Total count 77 - Distinct count 9 - Null count 0 | Column Description: division \n\tforeign key (state_abbrev) references state(StateCode),\n);\n\nCREATE TABLE events\n(\n\t\"Date received\" DATE, -- Example Values: `('2014-07-03',)`, `('2012-04-12',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1908 - Null count 0 | Column Description: Date received \n\tProduct TEXT, -- Example Values: `Bank account or service`, `Credit card` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: complaining about which product \n\t\"Sub-product\" TEXT, -- Example Values: `Checking account`, `Savings account`, `Other bank product/service`, `(CD) Certificate of deposit`, `Cashing a check without an account` | Value Statics: Total count 14091 - Distinct count 5 - Null count 9328 | Column Description: sub product if exists | Value Description: detailed product\n\tIssue TEXT, -- Example Values: `('Deposits and withdrawals',)`, `('Account opening, closing, or management',)`, `('Billing disputes',)` | Value Statics: Total count 23419 - Distinct count 38 - Null count 0 | Column Description: problems leading to this complaints \n\t\"Sub-issue\" TEXT, -- | Column Description: sub problems leading to this complaints if exists | Value Description: more detailed issue\n\t\"Consumer complaint narrative\" TEXT, -- | Column Description: Consumer complaint narrative \n\tTags TEXT, -- Example Values: `Older American`, `Older American, Servicemember`, `Servicemember` | Value Statics: Total count 3276 - Distinct count 3 - Null count 20143 | Column Description: tags of client \n\t\"Consumer consent provided?\" TEXT, -- Example Values: `N/A`, `Consent not provided`, `Consent provided`, `Other` | Value Statics: Total count 23323 - Distinct count 4 - Null count 96 | Column Name Meaning: Tags Consumer consent provided? | Column Description: whether the tags labeled under permission of the clients | Value Description: null, 'N/A' or empty value: indicating that the company didn't get the permission of consent. if the value is not empty: customers provide the consent for this tag.\n\t\"Submitted via\" TEXT, -- Example Values: `Email`, `Fax`, `Postal mail`, `Referral`, `Web` | Value Statics: Total count 23419 - Distinct count 6 - Null count 0 | Column Description: Submitted via \n\t\"Date sent to company\" TEXT, -- Example Values: `('2014-07-09',)`, `('2012-04-13',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1778 - Null count 0 | Column Description: Date sent to company | Value Description: delay of the complaints = 'Date sent to company'\n\t\"Company response to consumer\" TEXT, -- Example Values: `Closed with explanation`, `Closed with relief`, `Closed without relief`, `Closed with non-monetary relief`, `In progress` | Value Statics: Total count 23419 - Distinct count 8 - Null count 0 | Column Description: Company response to consumer \n\t\"Timely response?\" TEXT, -- Example Values: `Yes`, `No` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: whether the response of the company is timely \n\t\"Consumer disputed?\" TEXT, -- Example Values: `No`, `Yes` | Value Statics: Total count 22417 - Distinct count 2 - Null count 1002 | Column Description: whether the consumer dispute about the response from the company. \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000140',)` | Value Statics: Total count 23419 - Distinct count 23419 - Null count 0 | Column Description: id number indicating which complaint \n\tClient_ID TEXT, -- Example Values: `('C00003714',)`, `('C00001366',)`, `('C00002330',)` | Value Statics: Total count 23419 - Distinct count 5284 - Null count 0 | Column Name Meaning: Client ID | Column Description: id number indicating which client \n\tprimary key (\"Complaint ID\", Client_ID),\n\tforeign key (\"Complaint ID\") references callcenterlogs(\"Complaint ID\"),\n\tforeign key (Client_ID) references client(client_id),\n);\n\nCREATE TABLE reviews\n(\n\t\"Date\" DATE primary key,\n\tStars INTEGER, -- Example Values: `5`, `1`, `2` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tReviews TEXT, -- \n\tProduct TEXT, -- Example Values: `Eagle National Mortgage`, `Eagle National Bank`, `Eagle Capital` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tdistrict_id INTEGER, -- Example Values: `(65,)`, `(66,)`, `(23,)` | Value Statics: Total count 377 - Distinct count 77 - Null count 0 \n\tforeign key (district_id) references district(district_id),\n);",
"question": "What was the serve time for the complaint call from client \"C00007127\" on 2017/2/22?",
"evidence": "serve time refers to ser_time; longer ser_time means more verbose or longer complaint; on 2017/2/22 refers to \"Date received\" = '2017-02-22';"
}
|
{
"db_mode": "train",
"db_id": "retail_complains",
"gt_sql": "SELECT T1.ser_time FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.Client_ID = 'C00007127' AND T1.`Date received` = '2017-02-22'"
}
|
retail_complains
|
376
|
{
"db_schema": "CREATE TABLE state\n(\n\tStateCode TEXT constraint state_pk primary key,\n\tState TEXT, -- Example Values: `('Alabama',)`, `('Arkansas',)`, `('Arizona',)` | Value Statics: Total count 48 - Distinct count 48 - Null count 0 \n\tRegion TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0 \n);\n\nCREATE TABLE callcenterlogs\n(\n\t\"Date received\" DATE, -- Example Values: `('2017-03-27',)`, `('2017-03-23',)`, `('2017-03-22',)` | Value Statics: Total count 3999 - Distinct count 1842 - Null count 0 | Column Description: complaint date \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000175',)` | Value Statics: Total count 2504 - Distinct count 2504 - Null count 1495 | Column Description: unique id number representing each complaint \n\t\"rand client\" TEXT, -- Example Values: `('C00004587',)`, `('C00003328',)`, `('C00001685',)` | Value Statics: Total count 2504 - Distinct count 2019 - Null count 1495 | Column Description: client id \n\tphonefinal TEXT, -- Example Values: `('977-806-9726',)`, `('322-598-7152',)`, `('508-311-5237',)` | Value Statics: Total count 3999 - Distinct count 2744 - Null count 0 | Column Name Meaning: phone final | Column Description: final phone number \n\t\"vru+line\" TEXT, -- Example Values: `('AA0103',)`, `('AA0205',)`, `('AA0110',)` | Value Statics: Total count 3015 - Distinct count 27 - Null count 984 | Column Name Meaning: voice response unit line | Column Description: voice response unit line \n\tcall_id INTEGER, -- Example Values: `(34536,)`, `(34537,)`, `(34538,)` | Value Statics: Total count 3015 - Distinct count 3015 - Null count 984 | Column Name Meaning: call id | Column Description: id number identifying the call \n\tpriority INTEGER, -- Example Values: `0`, `2`, `1` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: priority of the complaint | Value Description: 0, 1, 2, null: not available, higher: -> higher priority, -> more serious/urgent complaint\n\ttype TEXT, -- Example Values: `NW`, `PS`, `NE`, `TT`, `IN` | Value Statics: Total count 3015 - Distinct count 6 - Null count 984 | Column Description: type of complaint \n\toutcome TEXT, -- Example Values: `AGENT`, `HANG`, `PHANTOM` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: the outcome of processing of complaints \n\tserver TEXT, -- Example Values: `('MICHAL',)`, `('TOVA',)`, `('YIFAT',)` | Value Statics: Total count 3015 - Distinct count 25 - Null count 984 | Column Description: server \n\tser_start TEXT, -- Example Values: `('13:34:11',)`, `('10:58:22',)`, `('13:00:54',)` | Value Statics: Total count 3999 - Distinct count 3733 - Null count 0 | Column Name Meaning: server start | Column Description: server start time | Value Description: HH:MM:SS\n\tser_exit TEXT, -- Example Values: `('13:40:23',)`, `('11:16:10',)`, `('13:13:31',)` | Value Statics: Total count 3999 - Distinct count 3738 - Null count 0 | Column Name Meaning: server exit | Column Description: server exit time \n\tser_time TEXT, -- Example Values: `('00:06:12',)`, `('00:17:48',)`, `('00:12:37',)` | Value Statics: Total count 3999 - Distinct count 1303 - Null count 0 | Column Name Meaning: server time | Column Description: server time | Value Description: longer server time referring to more verbose/longer complaint\n\tprimary key (\"Complaint ID\"),\n\tforeign key (\"rand client\") references client(client_id),\n);\n\nCREATE TABLE client\n(\n\tclient_id TEXT primary key,\n\tsex TEXT, -- Example Values: `Female`, `Male` | Value Statics: Total count 5369 - Distinct count 2 - Null count 0 | Column Description: sex of client \n\tday INTEGER, -- Example Values: `(13,)`, `(4,)`, `(9,)` | Value Statics: Total count 5369 - Distinct count 31 - Null count 0 | Column Description: day of the birthday \n\tmonth INTEGER, -- Example Values: `12`, `2`, `10`, `7`, `9` | Value Statics: Total count 5369 - Distinct count 12 - Null count 0 | Column Description: month of the birthday \n\tyear INTEGER, -- Example Values: `(1990,)`, `(1965,)`, `(1960,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: year when is born \n\tage INTEGER, -- Example Values: `(29,)`, `(54,)`, `(59,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: age | Value Description: teenager: 13-19 adult: 19-65 elder: > 65\n\tsocial TEXT, -- Example Values: `('926-93-2157',)`, `('806-94-5725',)`, `('614-70-9100',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: social number | Value Description: ssn: us id number for each person\n\tfirst TEXT, -- Example Values: `('Emma',)`, `('Noah',)`, `('Olivia',)` | Value Statics: Total count 5369 - Distinct count 2885 - Null count 0 | Column Description: first name \n\tmiddle TEXT, -- Example Values: `('Avaya',)`, `('Everest',)`, `('Brooklynne',)` | Value Statics: Total count 5369 - Distinct count 3925 - Null count 0 | Column Description: middle name \n\tlast TEXT, -- Example Values: `('Smith',)`, `('Thompson',)`, `('Johnson',)` | Value Statics: Total count 5369 - Distinct count 1769 - Null count 0 | Column Description: last name \n\tphone TEXT, -- Example Values: `('367-171-6840',)`, `('212-423-7734',)`, `('212-425-6932',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: phone number \n\temail TEXT, -- Example Values: `('emma.smith@gmail.com',)`, `('noah.thompson@gmail.com',)`, `('olivia.johnson@outlook.com',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: email | Value Description: google email / account: @gamil.com microsoft email / account: xxx@outlook.com\n\taddress_1 TEXT, -- Example Values: `('387 Wellington Ave.',)`, `('75 W. Berkshire St.',)`, `('36 Second St.',)` | Value Statics: Total count 5369 - Distinct count 5365 - Null count 0 | Column Description: address 1 \n\taddress_2 TEXT, -- Example Values: `('Unit 1',)`, `('Unit 6',)`, `('Unit 80',)` | Value Statics: Total count 83 - Distinct count 24 - Null count 5286 | Column Description: address 2 | Value Description: entire address = (address_1, address_2)\n\tcity TEXT, -- Example Values: `('Albuquerque',)`, `('New York City',)`, `('Indianapolis',)` | Value Statics: Total count 5369 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `('NM',)`, `('NY',)`, `('IN',)` | Value Statics: Total count 5369 - Distinct count 51 - Null count 0 | Column Description: state code \n\tzipcode INTEGER, -- Example Values: `(47246,)`, `(10040,)`, `(10162,)` | Value Statics: Total count 5369 - Distinct count 3512 - Null count 0 | Column Description: zipcode \n\tdistrict_id INTEGER, -- Example Values: `(18,)`, `(1,)`, `(5,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Name Meaning: district id | Column Description: district id number \n\tforeign key (district_id) references district(district_id),\n);\n\nCREATE TABLE district\n(\n\tdistrict_id INTEGER primary key,\n\tcity TEXT, -- Example Values: `('New York City',)`, `('Jacksonville',)`, `('Columbus',)` | Value Statics: Total count 77 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate_abbrev TEXT, -- Example Values: `('NY',)`, `('FL',)`, `('OH',)` | Value Statics: Total count 77 - Distinct count 51 - Null count 0 | Column Description: state abbreviated code \n\tdivision TEXT, -- Example Values: `Middle Atlantic`, `South Atlantic`, `East North Central`, `Pacific`, `Mountain` | Value Statics: Total count 77 - Distinct count 9 - Null count 0 | Column Description: division \n\tforeign key (state_abbrev) references state(StateCode),\n);\n\nCREATE TABLE events\n(\n\t\"Date received\" DATE, -- Example Values: `('2014-07-03',)`, `('2012-04-12',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1908 - Null count 0 | Column Description: Date received \n\tProduct TEXT, -- Example Values: `Bank account or service`, `Credit card` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: complaining about which product \n\t\"Sub-product\" TEXT, -- Example Values: `Checking account`, `Savings account`, `Other bank product/service`, `(CD) Certificate of deposit`, `Cashing a check without an account` | Value Statics: Total count 14091 - Distinct count 5 - Null count 9328 | Column Description: sub product if exists | Value Description: detailed product\n\tIssue TEXT, -- Example Values: `('Deposits and withdrawals',)`, `('Account opening, closing, or management',)`, `('Billing disputes',)` | Value Statics: Total count 23419 - Distinct count 38 - Null count 0 | Column Description: problems leading to this complaints \n\t\"Sub-issue\" TEXT, -- | Column Description: sub problems leading to this complaints if exists | Value Description: more detailed issue\n\t\"Consumer complaint narrative\" TEXT, -- | Column Description: Consumer complaint narrative \n\tTags TEXT, -- Example Values: `Older American`, `Older American, Servicemember`, `Servicemember` | Value Statics: Total count 3276 - Distinct count 3 - Null count 20143 | Column Description: tags of client \n\t\"Consumer consent provided?\" TEXT, -- Example Values: `N/A`, `Consent not provided`, `Consent provided`, `Other` | Value Statics: Total count 23323 - Distinct count 4 - Null count 96 | Column Name Meaning: Tags Consumer consent provided? | Column Description: whether the tags labeled under permission of the clients | Value Description: null, 'N/A' or empty value: indicating that the company didn't get the permission of consent. if the value is not empty: customers provide the consent for this tag.\n\t\"Submitted via\" TEXT, -- Example Values: `Email`, `Fax`, `Postal mail`, `Referral`, `Web` | Value Statics: Total count 23419 - Distinct count 6 - Null count 0 | Column Description: Submitted via \n\t\"Date sent to company\" TEXT, -- Example Values: `('2014-07-09',)`, `('2012-04-13',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1778 - Null count 0 | Column Description: Date sent to company | Value Description: delay of the complaints = 'Date sent to company'\n\t\"Company response to consumer\" TEXT, -- Example Values: `Closed with explanation`, `Closed with relief`, `Closed without relief`, `Closed with non-monetary relief`, `In progress` | Value Statics: Total count 23419 - Distinct count 8 - Null count 0 | Column Description: Company response to consumer \n\t\"Timely response?\" TEXT, -- Example Values: `Yes`, `No` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: whether the response of the company is timely \n\t\"Consumer disputed?\" TEXT, -- Example Values: `No`, `Yes` | Value Statics: Total count 22417 - Distinct count 2 - Null count 1002 | Column Description: whether the consumer dispute about the response from the company. \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000140',)` | Value Statics: Total count 23419 - Distinct count 23419 - Null count 0 | Column Description: id number indicating which complaint \n\tClient_ID TEXT, -- Example Values: `('C00003714',)`, `('C00001366',)`, `('C00002330',)` | Value Statics: Total count 23419 - Distinct count 5284 - Null count 0 | Column Name Meaning: Client ID | Column Description: id number indicating which client \n\tprimary key (\"Complaint ID\", Client_ID),\n\tforeign key (\"Complaint ID\") references callcenterlogs(\"Complaint ID\"),\n\tforeign key (Client_ID) references client(client_id),\n);\n\nCREATE TABLE reviews\n(\n\t\"Date\" DATE primary key,\n\tStars INTEGER, -- Example Values: `5`, `1`, `2` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tReviews TEXT, -- \n\tProduct TEXT, -- Example Values: `Eagle National Mortgage`, `Eagle National Bank`, `Eagle Capital` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tdistrict_id INTEGER, -- Example Values: `(65,)`, `(66,)`, `(23,)` | Value Statics: Total count 377 - Distinct count 77 - Null count 0 \n\tforeign key (district_id) references district(district_id),\n);",
"question": "Please list all first and last names of clients who live in New York city.",
"evidence": "New York City refers to city = 'New York City'"
}
|
{
"db_mode": "train",
"db_id": "retail_complains",
"gt_sql": "SELECT first, last FROM client WHERE city = 'New York City'"
}
|
retail_complains
|
294
|
{
"db_schema": "CREATE TABLE state\n(\n\tStateCode TEXT constraint state_pk primary key,\n\tState TEXT, -- Example Values: `('Alabama',)`, `('Arkansas',)`, `('Arizona',)` | Value Statics: Total count 48 - Distinct count 48 - Null count 0 \n\tRegion TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0 \n);\n\nCREATE TABLE callcenterlogs\n(\n\t\"Date received\" DATE, -- Example Values: `('2017-03-27',)`, `('2017-03-23',)`, `('2017-03-22',)` | Value Statics: Total count 3999 - Distinct count 1842 - Null count 0 | Column Description: complaint date \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000175',)` | Value Statics: Total count 2504 - Distinct count 2504 - Null count 1495 | Column Description: unique id number representing each complaint \n\t\"rand client\" TEXT, -- Example Values: `('C00004587',)`, `('C00003328',)`, `('C00001685',)` | Value Statics: Total count 2504 - Distinct count 2019 - Null count 1495 | Column Description: client id \n\tphonefinal TEXT, -- Example Values: `('977-806-9726',)`, `('322-598-7152',)`, `('508-311-5237',)` | Value Statics: Total count 3999 - Distinct count 2744 - Null count 0 | Column Name Meaning: phone final | Column Description: final phone number \n\t\"vru+line\" TEXT, -- Example Values: `('AA0103',)`, `('AA0205',)`, `('AA0110',)` | Value Statics: Total count 3015 - Distinct count 27 - Null count 984 | Column Name Meaning: voice response unit line | Column Description: voice response unit line \n\tcall_id INTEGER, -- Example Values: `(34536,)`, `(34537,)`, `(34538,)` | Value Statics: Total count 3015 - Distinct count 3015 - Null count 984 | Column Name Meaning: call id | Column Description: id number identifying the call \n\tpriority INTEGER, -- Example Values: `0`, `2`, `1` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: priority of the complaint | Value Description: 0, 1, 2, null: not available, higher: -> higher priority, -> more serious/urgent complaint\n\ttype TEXT, -- Example Values: `NW`, `PS`, `NE`, `TT`, `IN` | Value Statics: Total count 3015 - Distinct count 6 - Null count 984 | Column Description: type of complaint \n\toutcome TEXT, -- Example Values: `AGENT`, `HANG`, `PHANTOM` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: the outcome of processing of complaints \n\tserver TEXT, -- Example Values: `('MICHAL',)`, `('TOVA',)`, `('YIFAT',)` | Value Statics: Total count 3015 - Distinct count 25 - Null count 984 | Column Description: server \n\tser_start TEXT, -- Example Values: `('13:34:11',)`, `('10:58:22',)`, `('13:00:54',)` | Value Statics: Total count 3999 - Distinct count 3733 - Null count 0 | Column Name Meaning: server start | Column Description: server start time | Value Description: HH:MM:SS\n\tser_exit TEXT, -- Example Values: `('13:40:23',)`, `('11:16:10',)`, `('13:13:31',)` | Value Statics: Total count 3999 - Distinct count 3738 - Null count 0 | Column Name Meaning: server exit | Column Description: server exit time \n\tser_time TEXT, -- Example Values: `('00:06:12',)`, `('00:17:48',)`, `('00:12:37',)` | Value Statics: Total count 3999 - Distinct count 1303 - Null count 0 | Column Name Meaning: server time | Column Description: server time | Value Description: longer server time referring to more verbose/longer complaint\n\tprimary key (\"Complaint ID\"),\n\tforeign key (\"rand client\") references client(client_id),\n);\n\nCREATE TABLE client\n(\n\tclient_id TEXT primary key,\n\tsex TEXT, -- Example Values: `Female`, `Male` | Value Statics: Total count 5369 - Distinct count 2 - Null count 0 | Column Description: sex of client \n\tday INTEGER, -- Example Values: `(13,)`, `(4,)`, `(9,)` | Value Statics: Total count 5369 - Distinct count 31 - Null count 0 | Column Description: day of the birthday \n\tmonth INTEGER, -- Example Values: `12`, `2`, `10`, `7`, `9` | Value Statics: Total count 5369 - Distinct count 12 - Null count 0 | Column Description: month of the birthday \n\tyear INTEGER, -- Example Values: `(1990,)`, `(1965,)`, `(1960,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: year when is born \n\tage INTEGER, -- Example Values: `(29,)`, `(54,)`, `(59,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: age | Value Description: teenager: 13-19 adult: 19-65 elder: > 65\n\tsocial TEXT, -- Example Values: `('926-93-2157',)`, `('806-94-5725',)`, `('614-70-9100',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: social number | Value Description: ssn: us id number for each person\n\tfirst TEXT, -- Example Values: `('Emma',)`, `('Noah',)`, `('Olivia',)` | Value Statics: Total count 5369 - Distinct count 2885 - Null count 0 | Column Description: first name \n\tmiddle TEXT, -- Example Values: `('Avaya',)`, `('Everest',)`, `('Brooklynne',)` | Value Statics: Total count 5369 - Distinct count 3925 - Null count 0 | Column Description: middle name \n\tlast TEXT, -- Example Values: `('Smith',)`, `('Thompson',)`, `('Johnson',)` | Value Statics: Total count 5369 - Distinct count 1769 - Null count 0 | Column Description: last name \n\tphone TEXT, -- Example Values: `('367-171-6840',)`, `('212-423-7734',)`, `('212-425-6932',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: phone number \n\temail TEXT, -- Example Values: `('emma.smith@gmail.com',)`, `('noah.thompson@gmail.com',)`, `('olivia.johnson@outlook.com',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: email | Value Description: google email / account: @gamil.com microsoft email / account: xxx@outlook.com\n\taddress_1 TEXT, -- Example Values: `('387 Wellington Ave.',)`, `('75 W. Berkshire St.',)`, `('36 Second St.',)` | Value Statics: Total count 5369 - Distinct count 5365 - Null count 0 | Column Description: address 1 \n\taddress_2 TEXT, -- Example Values: `('Unit 1',)`, `('Unit 6',)`, `('Unit 80',)` | Value Statics: Total count 83 - Distinct count 24 - Null count 5286 | Column Description: address 2 | Value Description: entire address = (address_1, address_2)\n\tcity TEXT, -- Example Values: `('Albuquerque',)`, `('New York City',)`, `('Indianapolis',)` | Value Statics: Total count 5369 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `('NM',)`, `('NY',)`, `('IN',)` | Value Statics: Total count 5369 - Distinct count 51 - Null count 0 | Column Description: state code \n\tzipcode INTEGER, -- Example Values: `(47246,)`, `(10040,)`, `(10162,)` | Value Statics: Total count 5369 - Distinct count 3512 - Null count 0 | Column Description: zipcode \n\tdistrict_id INTEGER, -- Example Values: `(18,)`, `(1,)`, `(5,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Name Meaning: district id | Column Description: district id number \n\tforeign key (district_id) references district(district_id),\n);\n\nCREATE TABLE district\n(\n\tdistrict_id INTEGER primary key,\n\tcity TEXT, -- Example Values: `('New York City',)`, `('Jacksonville',)`, `('Columbus',)` | Value Statics: Total count 77 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate_abbrev TEXT, -- Example Values: `('NY',)`, `('FL',)`, `('OH',)` | Value Statics: Total count 77 - Distinct count 51 - Null count 0 | Column Description: state abbreviated code \n\tdivision TEXT, -- Example Values: `Middle Atlantic`, `South Atlantic`, `East North Central`, `Pacific`, `Mountain` | Value Statics: Total count 77 - Distinct count 9 - Null count 0 | Column Description: division \n\tforeign key (state_abbrev) references state(StateCode),\n);\n\nCREATE TABLE events\n(\n\t\"Date received\" DATE, -- Example Values: `('2014-07-03',)`, `('2012-04-12',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1908 - Null count 0 | Column Description: Date received \n\tProduct TEXT, -- Example Values: `Bank account or service`, `Credit card` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: complaining about which product \n\t\"Sub-product\" TEXT, -- Example Values: `Checking account`, `Savings account`, `Other bank product/service`, `(CD) Certificate of deposit`, `Cashing a check without an account` | Value Statics: Total count 14091 - Distinct count 5 - Null count 9328 | Column Description: sub product if exists | Value Description: detailed product\n\tIssue TEXT, -- Example Values: `('Deposits and withdrawals',)`, `('Account opening, closing, or management',)`, `('Billing disputes',)` | Value Statics: Total count 23419 - Distinct count 38 - Null count 0 | Column Description: problems leading to this complaints \n\t\"Sub-issue\" TEXT, -- | Column Description: sub problems leading to this complaints if exists | Value Description: more detailed issue\n\t\"Consumer complaint narrative\" TEXT, -- | Column Description: Consumer complaint narrative \n\tTags TEXT, -- Example Values: `Older American`, `Older American, Servicemember`, `Servicemember` | Value Statics: Total count 3276 - Distinct count 3 - Null count 20143 | Column Description: tags of client \n\t\"Consumer consent provided?\" TEXT, -- Example Values: `N/A`, `Consent not provided`, `Consent provided`, `Other` | Value Statics: Total count 23323 - Distinct count 4 - Null count 96 | Column Name Meaning: Tags Consumer consent provided? | Column Description: whether the tags labeled under permission of the clients | Value Description: null, 'N/A' or empty value: indicating that the company didn't get the permission of consent. if the value is not empty: customers provide the consent for this tag.\n\t\"Submitted via\" TEXT, -- Example Values: `Email`, `Fax`, `Postal mail`, `Referral`, `Web` | Value Statics: Total count 23419 - Distinct count 6 - Null count 0 | Column Description: Submitted via \n\t\"Date sent to company\" TEXT, -- Example Values: `('2014-07-09',)`, `('2012-04-13',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1778 - Null count 0 | Column Description: Date sent to company | Value Description: delay of the complaints = 'Date sent to company'\n\t\"Company response to consumer\" TEXT, -- Example Values: `Closed with explanation`, `Closed with relief`, `Closed without relief`, `Closed with non-monetary relief`, `In progress` | Value Statics: Total count 23419 - Distinct count 8 - Null count 0 | Column Description: Company response to consumer \n\t\"Timely response?\" TEXT, -- Example Values: `Yes`, `No` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: whether the response of the company is timely \n\t\"Consumer disputed?\" TEXT, -- Example Values: `No`, `Yes` | Value Statics: Total count 22417 - Distinct count 2 - Null count 1002 | Column Description: whether the consumer dispute about the response from the company. \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000140',)` | Value Statics: Total count 23419 - Distinct count 23419 - Null count 0 | Column Description: id number indicating which complaint \n\tClient_ID TEXT, -- Example Values: `('C00003714',)`, `('C00001366',)`, `('C00002330',)` | Value Statics: Total count 23419 - Distinct count 5284 - Null count 0 | Column Name Meaning: Client ID | Column Description: id number indicating which client \n\tprimary key (\"Complaint ID\", Client_ID),\n\tforeign key (\"Complaint ID\") references callcenterlogs(\"Complaint ID\"),\n\tforeign key (Client_ID) references client(client_id),\n);\n\nCREATE TABLE reviews\n(\n\t\"Date\" DATE primary key,\n\tStars INTEGER, -- Example Values: `5`, `1`, `2` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tReviews TEXT, -- \n\tProduct TEXT, -- Example Values: `Eagle National Mortgage`, `Eagle National Bank`, `Eagle Capital` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tdistrict_id INTEGER, -- Example Values: `(65,)`, `(66,)`, `(23,)` | Value Statics: Total count 377 - Distinct count 77 - Null count 0 \n\tforeign key (district_id) references district(district_id),\n);",
"question": "How many complaints are not in process with an agent?",
"evidence": "not in process with an agent refers to outcome ! = 'AGENT';"
}
|
{
"db_mode": "train",
"db_id": "retail_complains",
"gt_sql": "SELECT COUNT(outcome) FROM callcenterlogs WHERE outcome != 'AGENT'"
}
|
retail_complains
|
393
|
{
"db_schema": "CREATE TABLE state\n(\n\tStateCode TEXT constraint state_pk primary key,\n\tState TEXT, -- Example Values: `('Alabama',)`, `('Arkansas',)`, `('Arizona',)` | Value Statics: Total count 48 - Distinct count 48 - Null count 0 \n\tRegion TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0 \n);\n\nCREATE TABLE callcenterlogs\n(\n\t\"Date received\" DATE, -- Example Values: `('2017-03-27',)`, `('2017-03-23',)`, `('2017-03-22',)` | Value Statics: Total count 3999 - Distinct count 1842 - Null count 0 | Column Description: complaint date \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000175',)` | Value Statics: Total count 2504 - Distinct count 2504 - Null count 1495 | Column Description: unique id number representing each complaint \n\t\"rand client\" TEXT, -- Example Values: `('C00004587',)`, `('C00003328',)`, `('C00001685',)` | Value Statics: Total count 2504 - Distinct count 2019 - Null count 1495 | Column Description: client id \n\tphonefinal TEXT, -- Example Values: `('977-806-9726',)`, `('322-598-7152',)`, `('508-311-5237',)` | Value Statics: Total count 3999 - Distinct count 2744 - Null count 0 | Column Name Meaning: phone final | Column Description: final phone number \n\t\"vru+line\" TEXT, -- Example Values: `('AA0103',)`, `('AA0205',)`, `('AA0110',)` | Value Statics: Total count 3015 - Distinct count 27 - Null count 984 | Column Name Meaning: voice response unit line | Column Description: voice response unit line \n\tcall_id INTEGER, -- Example Values: `(34536,)`, `(34537,)`, `(34538,)` | Value Statics: Total count 3015 - Distinct count 3015 - Null count 984 | Column Name Meaning: call id | Column Description: id number identifying the call \n\tpriority INTEGER, -- Example Values: `0`, `2`, `1` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: priority of the complaint | Value Description: 0, 1, 2, null: not available, higher: -> higher priority, -> more serious/urgent complaint\n\ttype TEXT, -- Example Values: `NW`, `PS`, `NE`, `TT`, `IN` | Value Statics: Total count 3015 - Distinct count 6 - Null count 984 | Column Description: type of complaint \n\toutcome TEXT, -- Example Values: `AGENT`, `HANG`, `PHANTOM` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: the outcome of processing of complaints \n\tserver TEXT, -- Example Values: `('MICHAL',)`, `('TOVA',)`, `('YIFAT',)` | Value Statics: Total count 3015 - Distinct count 25 - Null count 984 | Column Description: server \n\tser_start TEXT, -- Example Values: `('13:34:11',)`, `('10:58:22',)`, `('13:00:54',)` | Value Statics: Total count 3999 - Distinct count 3733 - Null count 0 | Column Name Meaning: server start | Column Description: server start time | Value Description: HH:MM:SS\n\tser_exit TEXT, -- Example Values: `('13:40:23',)`, `('11:16:10',)`, `('13:13:31',)` | Value Statics: Total count 3999 - Distinct count 3738 - Null count 0 | Column Name Meaning: server exit | Column Description: server exit time \n\tser_time TEXT, -- Example Values: `('00:06:12',)`, `('00:17:48',)`, `('00:12:37',)` | Value Statics: Total count 3999 - Distinct count 1303 - Null count 0 | Column Name Meaning: server time | Column Description: server time | Value Description: longer server time referring to more verbose/longer complaint\n\tprimary key (\"Complaint ID\"),\n\tforeign key (\"rand client\") references client(client_id),\n);\n\nCREATE TABLE client\n(\n\tclient_id TEXT primary key,\n\tsex TEXT, -- Example Values: `Female`, `Male` | Value Statics: Total count 5369 - Distinct count 2 - Null count 0 | Column Description: sex of client \n\tday INTEGER, -- Example Values: `(13,)`, `(4,)`, `(9,)` | Value Statics: Total count 5369 - Distinct count 31 - Null count 0 | Column Description: day of the birthday \n\tmonth INTEGER, -- Example Values: `12`, `2`, `10`, `7`, `9` | Value Statics: Total count 5369 - Distinct count 12 - Null count 0 | Column Description: month of the birthday \n\tyear INTEGER, -- Example Values: `(1990,)`, `(1965,)`, `(1960,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: year when is born \n\tage INTEGER, -- Example Values: `(29,)`, `(54,)`, `(59,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: age | Value Description: teenager: 13-19 adult: 19-65 elder: > 65\n\tsocial TEXT, -- Example Values: `('926-93-2157',)`, `('806-94-5725',)`, `('614-70-9100',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: social number | Value Description: ssn: us id number for each person\n\tfirst TEXT, -- Example Values: `('Emma',)`, `('Noah',)`, `('Olivia',)` | Value Statics: Total count 5369 - Distinct count 2885 - Null count 0 | Column Description: first name \n\tmiddle TEXT, -- Example Values: `('Avaya',)`, `('Everest',)`, `('Brooklynne',)` | Value Statics: Total count 5369 - Distinct count 3925 - Null count 0 | Column Description: middle name \n\tlast TEXT, -- Example Values: `('Smith',)`, `('Thompson',)`, `('Johnson',)` | Value Statics: Total count 5369 - Distinct count 1769 - Null count 0 | Column Description: last name \n\tphone TEXT, -- Example Values: `('367-171-6840',)`, `('212-423-7734',)`, `('212-425-6932',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: phone number \n\temail TEXT, -- Example Values: `('emma.smith@gmail.com',)`, `('noah.thompson@gmail.com',)`, `('olivia.johnson@outlook.com',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: email | Value Description: google email / account: @gamil.com microsoft email / account: xxx@outlook.com\n\taddress_1 TEXT, -- Example Values: `('387 Wellington Ave.',)`, `('75 W. Berkshire St.',)`, `('36 Second St.',)` | Value Statics: Total count 5369 - Distinct count 5365 - Null count 0 | Column Description: address 1 \n\taddress_2 TEXT, -- Example Values: `('Unit 1',)`, `('Unit 6',)`, `('Unit 80',)` | Value Statics: Total count 83 - Distinct count 24 - Null count 5286 | Column Description: address 2 | Value Description: entire address = (address_1, address_2)\n\tcity TEXT, -- Example Values: `('Albuquerque',)`, `('New York City',)`, `('Indianapolis',)` | Value Statics: Total count 5369 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `('NM',)`, `('NY',)`, `('IN',)` | Value Statics: Total count 5369 - Distinct count 51 - Null count 0 | Column Description: state code \n\tzipcode INTEGER, -- Example Values: `(47246,)`, `(10040,)`, `(10162,)` | Value Statics: Total count 5369 - Distinct count 3512 - Null count 0 | Column Description: zipcode \n\tdistrict_id INTEGER, -- Example Values: `(18,)`, `(1,)`, `(5,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Name Meaning: district id | Column Description: district id number \n\tforeign key (district_id) references district(district_id),\n);\n\nCREATE TABLE district\n(\n\tdistrict_id INTEGER primary key,\n\tcity TEXT, -- Example Values: `('New York City',)`, `('Jacksonville',)`, `('Columbus',)` | Value Statics: Total count 77 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate_abbrev TEXT, -- Example Values: `('NY',)`, `('FL',)`, `('OH',)` | Value Statics: Total count 77 - Distinct count 51 - Null count 0 | Column Description: state abbreviated code \n\tdivision TEXT, -- Example Values: `Middle Atlantic`, `South Atlantic`, `East North Central`, `Pacific`, `Mountain` | Value Statics: Total count 77 - Distinct count 9 - Null count 0 | Column Description: division \n\tforeign key (state_abbrev) references state(StateCode),\n);\n\nCREATE TABLE events\n(\n\t\"Date received\" DATE, -- Example Values: `('2014-07-03',)`, `('2012-04-12',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1908 - Null count 0 | Column Description: Date received \n\tProduct TEXT, -- Example Values: `Bank account or service`, `Credit card` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: complaining about which product \n\t\"Sub-product\" TEXT, -- Example Values: `Checking account`, `Savings account`, `Other bank product/service`, `(CD) Certificate of deposit`, `Cashing a check without an account` | Value Statics: Total count 14091 - Distinct count 5 - Null count 9328 | Column Description: sub product if exists | Value Description: detailed product\n\tIssue TEXT, -- Example Values: `('Deposits and withdrawals',)`, `('Account opening, closing, or management',)`, `('Billing disputes',)` | Value Statics: Total count 23419 - Distinct count 38 - Null count 0 | Column Description: problems leading to this complaints \n\t\"Sub-issue\" TEXT, -- | Column Description: sub problems leading to this complaints if exists | Value Description: more detailed issue\n\t\"Consumer complaint narrative\" TEXT, -- | Column Description: Consumer complaint narrative \n\tTags TEXT, -- Example Values: `Older American`, `Older American, Servicemember`, `Servicemember` | Value Statics: Total count 3276 - Distinct count 3 - Null count 20143 | Column Description: tags of client \n\t\"Consumer consent provided?\" TEXT, -- Example Values: `N/A`, `Consent not provided`, `Consent provided`, `Other` | Value Statics: Total count 23323 - Distinct count 4 - Null count 96 | Column Name Meaning: Tags Consumer consent provided? | Column Description: whether the tags labeled under permission of the clients | Value Description: null, 'N/A' or empty value: indicating that the company didn't get the permission of consent. if the value is not empty: customers provide the consent for this tag.\n\t\"Submitted via\" TEXT, -- Example Values: `Email`, `Fax`, `Postal mail`, `Referral`, `Web` | Value Statics: Total count 23419 - Distinct count 6 - Null count 0 | Column Description: Submitted via \n\t\"Date sent to company\" TEXT, -- Example Values: `('2014-07-09',)`, `('2012-04-13',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1778 - Null count 0 | Column Description: Date sent to company | Value Description: delay of the complaints = 'Date sent to company'\n\t\"Company response to consumer\" TEXT, -- Example Values: `Closed with explanation`, `Closed with relief`, `Closed without relief`, `Closed with non-monetary relief`, `In progress` | Value Statics: Total count 23419 - Distinct count 8 - Null count 0 | Column Description: Company response to consumer \n\t\"Timely response?\" TEXT, -- Example Values: `Yes`, `No` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: whether the response of the company is timely \n\t\"Consumer disputed?\" TEXT, -- Example Values: `No`, `Yes` | Value Statics: Total count 22417 - Distinct count 2 - Null count 1002 | Column Description: whether the consumer dispute about the response from the company. \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000140',)` | Value Statics: Total count 23419 - Distinct count 23419 - Null count 0 | Column Description: id number indicating which complaint \n\tClient_ID TEXT, -- Example Values: `('C00003714',)`, `('C00001366',)`, `('C00002330',)` | Value Statics: Total count 23419 - Distinct count 5284 - Null count 0 | Column Name Meaning: Client ID | Column Description: id number indicating which client \n\tprimary key (\"Complaint ID\", Client_ID),\n\tforeign key (\"Complaint ID\") references callcenterlogs(\"Complaint ID\"),\n\tforeign key (Client_ID) references client(client_id),\n);\n\nCREATE TABLE reviews\n(\n\t\"Date\" DATE primary key,\n\tStars INTEGER, -- Example Values: `5`, `1`, `2` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tReviews TEXT, -- \n\tProduct TEXT, -- Example Values: `Eagle National Mortgage`, `Eagle National Bank`, `Eagle Capital` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tdistrict_id INTEGER, -- Example Values: `(65,)`, `(66,)`, `(23,)` | Value Statics: Total count 377 - Distinct count 77 - Null count 0 \n\tforeign key (district_id) references district(district_id),\n);",
"question": "In the complains received in 2012, how many of them are submitted through email?",
"evidence": "received in 2012 refers to Date received LIKE '2012%'; submitted through email refers to Submitted via = 'Email'"
}
|
{
"db_mode": "train",
"db_id": "retail_complains",
"gt_sql": "SELECT COUNT(`Submitted via`) FROM events WHERE strftime('%Y', `Date received`) = '2012' AND `Submitted via` = 'Email'"
}
|
retail_complains
|
390
|
{
"db_schema": "CREATE TABLE state\n(\n\tStateCode TEXT constraint state_pk primary key,\n\tState TEXT, -- Example Values: `('Alabama',)`, `('Arkansas',)`, `('Arizona',)` | Value Statics: Total count 48 - Distinct count 48 - Null count 0 \n\tRegion TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0 \n);\n\nCREATE TABLE callcenterlogs\n(\n\t\"Date received\" DATE, -- Example Values: `('2017-03-27',)`, `('2017-03-23',)`, `('2017-03-22',)` | Value Statics: Total count 3999 - Distinct count 1842 - Null count 0 | Column Description: complaint date \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000175',)` | Value Statics: Total count 2504 - Distinct count 2504 - Null count 1495 | Column Description: unique id number representing each complaint \n\t\"rand client\" TEXT, -- Example Values: `('C00004587',)`, `('C00003328',)`, `('C00001685',)` | Value Statics: Total count 2504 - Distinct count 2019 - Null count 1495 | Column Description: client id \n\tphonefinal TEXT, -- Example Values: `('977-806-9726',)`, `('322-598-7152',)`, `('508-311-5237',)` | Value Statics: Total count 3999 - Distinct count 2744 - Null count 0 | Column Name Meaning: phone final | Column Description: final phone number \n\t\"vru+line\" TEXT, -- Example Values: `('AA0103',)`, `('AA0205',)`, `('AA0110',)` | Value Statics: Total count 3015 - Distinct count 27 - Null count 984 | Column Name Meaning: voice response unit line | Column Description: voice response unit line \n\tcall_id INTEGER, -- Example Values: `(34536,)`, `(34537,)`, `(34538,)` | Value Statics: Total count 3015 - Distinct count 3015 - Null count 984 | Column Name Meaning: call id | Column Description: id number identifying the call \n\tpriority INTEGER, -- Example Values: `0`, `2`, `1` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: priority of the complaint | Value Description: 0, 1, 2, null: not available, higher: -> higher priority, -> more serious/urgent complaint\n\ttype TEXT, -- Example Values: `NW`, `PS`, `NE`, `TT`, `IN` | Value Statics: Total count 3015 - Distinct count 6 - Null count 984 | Column Description: type of complaint \n\toutcome TEXT, -- Example Values: `AGENT`, `HANG`, `PHANTOM` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: the outcome of processing of complaints \n\tserver TEXT, -- Example Values: `('MICHAL',)`, `('TOVA',)`, `('YIFAT',)` | Value Statics: Total count 3015 - Distinct count 25 - Null count 984 | Column Description: server \n\tser_start TEXT, -- Example Values: `('13:34:11',)`, `('10:58:22',)`, `('13:00:54',)` | Value Statics: Total count 3999 - Distinct count 3733 - Null count 0 | Column Name Meaning: server start | Column Description: server start time | Value Description: HH:MM:SS\n\tser_exit TEXT, -- Example Values: `('13:40:23',)`, `('11:16:10',)`, `('13:13:31',)` | Value Statics: Total count 3999 - Distinct count 3738 - Null count 0 | Column Name Meaning: server exit | Column Description: server exit time \n\tser_time TEXT, -- Example Values: `('00:06:12',)`, `('00:17:48',)`, `('00:12:37',)` | Value Statics: Total count 3999 - Distinct count 1303 - Null count 0 | Column Name Meaning: server time | Column Description: server time | Value Description: longer server time referring to more verbose/longer complaint\n\tprimary key (\"Complaint ID\"),\n\tforeign key (\"rand client\") references client(client_id),\n);\n\nCREATE TABLE client\n(\n\tclient_id TEXT primary key,\n\tsex TEXT, -- Example Values: `Female`, `Male` | Value Statics: Total count 5369 - Distinct count 2 - Null count 0 | Column Description: sex of client \n\tday INTEGER, -- Example Values: `(13,)`, `(4,)`, `(9,)` | Value Statics: Total count 5369 - Distinct count 31 - Null count 0 | Column Description: day of the birthday \n\tmonth INTEGER, -- Example Values: `12`, `2`, `10`, `7`, `9` | Value Statics: Total count 5369 - Distinct count 12 - Null count 0 | Column Description: month of the birthday \n\tyear INTEGER, -- Example Values: `(1990,)`, `(1965,)`, `(1960,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: year when is born \n\tage INTEGER, -- Example Values: `(29,)`, `(54,)`, `(59,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: age | Value Description: teenager: 13-19 adult: 19-65 elder: > 65\n\tsocial TEXT, -- Example Values: `('926-93-2157',)`, `('806-94-5725',)`, `('614-70-9100',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: social number | Value Description: ssn: us id number for each person\n\tfirst TEXT, -- Example Values: `('Emma',)`, `('Noah',)`, `('Olivia',)` | Value Statics: Total count 5369 - Distinct count 2885 - Null count 0 | Column Description: first name \n\tmiddle TEXT, -- Example Values: `('Avaya',)`, `('Everest',)`, `('Brooklynne',)` | Value Statics: Total count 5369 - Distinct count 3925 - Null count 0 | Column Description: middle name \n\tlast TEXT, -- Example Values: `('Smith',)`, `('Thompson',)`, `('Johnson',)` | Value Statics: Total count 5369 - Distinct count 1769 - Null count 0 | Column Description: last name \n\tphone TEXT, -- Example Values: `('367-171-6840',)`, `('212-423-7734',)`, `('212-425-6932',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: phone number \n\temail TEXT, -- Example Values: `('emma.smith@gmail.com',)`, `('noah.thompson@gmail.com',)`, `('olivia.johnson@outlook.com',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: email | Value Description: google email / account: @gamil.com microsoft email / account: xxx@outlook.com\n\taddress_1 TEXT, -- Example Values: `('387 Wellington Ave.',)`, `('75 W. Berkshire St.',)`, `('36 Second St.',)` | Value Statics: Total count 5369 - Distinct count 5365 - Null count 0 | Column Description: address 1 \n\taddress_2 TEXT, -- Example Values: `('Unit 1',)`, `('Unit 6',)`, `('Unit 80',)` | Value Statics: Total count 83 - Distinct count 24 - Null count 5286 | Column Description: address 2 | Value Description: entire address = (address_1, address_2)\n\tcity TEXT, -- Example Values: `('Albuquerque',)`, `('New York City',)`, `('Indianapolis',)` | Value Statics: Total count 5369 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `('NM',)`, `('NY',)`, `('IN',)` | Value Statics: Total count 5369 - Distinct count 51 - Null count 0 | Column Description: state code \n\tzipcode INTEGER, -- Example Values: `(47246,)`, `(10040,)`, `(10162,)` | Value Statics: Total count 5369 - Distinct count 3512 - Null count 0 | Column Description: zipcode \n\tdistrict_id INTEGER, -- Example Values: `(18,)`, `(1,)`, `(5,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Name Meaning: district id | Column Description: district id number \n\tforeign key (district_id) references district(district_id),\n);\n\nCREATE TABLE district\n(\n\tdistrict_id INTEGER primary key,\n\tcity TEXT, -- Example Values: `('New York City',)`, `('Jacksonville',)`, `('Columbus',)` | Value Statics: Total count 77 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate_abbrev TEXT, -- Example Values: `('NY',)`, `('FL',)`, `('OH',)` | Value Statics: Total count 77 - Distinct count 51 - Null count 0 | Column Description: state abbreviated code \n\tdivision TEXT, -- Example Values: `Middle Atlantic`, `South Atlantic`, `East North Central`, `Pacific`, `Mountain` | Value Statics: Total count 77 - Distinct count 9 - Null count 0 | Column Description: division \n\tforeign key (state_abbrev) references state(StateCode),\n);\n\nCREATE TABLE events\n(\n\t\"Date received\" DATE, -- Example Values: `('2014-07-03',)`, `('2012-04-12',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1908 - Null count 0 | Column Description: Date received \n\tProduct TEXT, -- Example Values: `Bank account or service`, `Credit card` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: complaining about which product \n\t\"Sub-product\" TEXT, -- Example Values: `Checking account`, `Savings account`, `Other bank product/service`, `(CD) Certificate of deposit`, `Cashing a check without an account` | Value Statics: Total count 14091 - Distinct count 5 - Null count 9328 | Column Description: sub product if exists | Value Description: detailed product\n\tIssue TEXT, -- Example Values: `('Deposits and withdrawals',)`, `('Account opening, closing, or management',)`, `('Billing disputes',)` | Value Statics: Total count 23419 - Distinct count 38 - Null count 0 | Column Description: problems leading to this complaints \n\t\"Sub-issue\" TEXT, -- | Column Description: sub problems leading to this complaints if exists | Value Description: more detailed issue\n\t\"Consumer complaint narrative\" TEXT, -- | Column Description: Consumer complaint narrative \n\tTags TEXT, -- Example Values: `Older American`, `Older American, Servicemember`, `Servicemember` | Value Statics: Total count 3276 - Distinct count 3 - Null count 20143 | Column Description: tags of client \n\t\"Consumer consent provided?\" TEXT, -- Example Values: `N/A`, `Consent not provided`, `Consent provided`, `Other` | Value Statics: Total count 23323 - Distinct count 4 - Null count 96 | Column Name Meaning: Tags Consumer consent provided? | Column Description: whether the tags labeled under permission of the clients | Value Description: null, 'N/A' or empty value: indicating that the company didn't get the permission of consent. if the value is not empty: customers provide the consent for this tag.\n\t\"Submitted via\" TEXT, -- Example Values: `Email`, `Fax`, `Postal mail`, `Referral`, `Web` | Value Statics: Total count 23419 - Distinct count 6 - Null count 0 | Column Description: Submitted via \n\t\"Date sent to company\" TEXT, -- Example Values: `('2014-07-09',)`, `('2012-04-13',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1778 - Null count 0 | Column Description: Date sent to company | Value Description: delay of the complaints = 'Date sent to company'\n\t\"Company response to consumer\" TEXT, -- Example Values: `Closed with explanation`, `Closed with relief`, `Closed without relief`, `Closed with non-monetary relief`, `In progress` | Value Statics: Total count 23419 - Distinct count 8 - Null count 0 | Column Description: Company response to consumer \n\t\"Timely response?\" TEXT, -- Example Values: `Yes`, `No` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: whether the response of the company is timely \n\t\"Consumer disputed?\" TEXT, -- Example Values: `No`, `Yes` | Value Statics: Total count 22417 - Distinct count 2 - Null count 1002 | Column Description: whether the consumer dispute about the response from the company. \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000140',)` | Value Statics: Total count 23419 - Distinct count 23419 - Null count 0 | Column Description: id number indicating which complaint \n\tClient_ID TEXT, -- Example Values: `('C00003714',)`, `('C00001366',)`, `('C00002330',)` | Value Statics: Total count 23419 - Distinct count 5284 - Null count 0 | Column Name Meaning: Client ID | Column Description: id number indicating which client \n\tprimary key (\"Complaint ID\", Client_ID),\n\tforeign key (\"Complaint ID\") references callcenterlogs(\"Complaint ID\"),\n\tforeign key (Client_ID) references client(client_id),\n);\n\nCREATE TABLE reviews\n(\n\t\"Date\" DATE primary key,\n\tStars INTEGER, -- Example Values: `5`, `1`, `2` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tReviews TEXT, -- \n\tProduct TEXT, -- Example Values: `Eagle National Mortgage`, `Eagle National Bank`, `Eagle Capital` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tdistrict_id INTEGER, -- Example Values: `(65,)`, `(66,)`, `(23,)` | Value Statics: Total count 377 - Distinct count 77 - Null count 0 \n\tforeign key (district_id) references district(district_id),\n);",
"question": "Please list all clients' phone numbers and complaint IDs which are still in progress.",
"evidence": "in progress refers to Company response to consumer = 'In progress'"
}
|
{
"db_mode": "train",
"db_id": "retail_complains",
"gt_sql": "SELECT T1.phone, T2.`Complaint ID` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Company response to consumer` = 'In progress'"
}
|
retail_complains
|
297
|
{
"db_schema": "CREATE TABLE state\n(\n\tStateCode TEXT constraint state_pk primary key,\n\tState TEXT, -- Example Values: `('Alabama',)`, `('Arkansas',)`, `('Arizona',)` | Value Statics: Total count 48 - Distinct count 48 - Null count 0 \n\tRegion TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0 \n);\n\nCREATE TABLE callcenterlogs\n(\n\t\"Date received\" DATE, -- Example Values: `('2017-03-27',)`, `('2017-03-23',)`, `('2017-03-22',)` | Value Statics: Total count 3999 - Distinct count 1842 - Null count 0 | Column Description: complaint date \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000175',)` | Value Statics: Total count 2504 - Distinct count 2504 - Null count 1495 | Column Description: unique id number representing each complaint \n\t\"rand client\" TEXT, -- Example Values: `('C00004587',)`, `('C00003328',)`, `('C00001685',)` | Value Statics: Total count 2504 - Distinct count 2019 - Null count 1495 | Column Description: client id \n\tphonefinal TEXT, -- Example Values: `('977-806-9726',)`, `('322-598-7152',)`, `('508-311-5237',)` | Value Statics: Total count 3999 - Distinct count 2744 - Null count 0 | Column Name Meaning: phone final | Column Description: final phone number \n\t\"vru+line\" TEXT, -- Example Values: `('AA0103',)`, `('AA0205',)`, `('AA0110',)` | Value Statics: Total count 3015 - Distinct count 27 - Null count 984 | Column Name Meaning: voice response unit line | Column Description: voice response unit line \n\tcall_id INTEGER, -- Example Values: `(34536,)`, `(34537,)`, `(34538,)` | Value Statics: Total count 3015 - Distinct count 3015 - Null count 984 | Column Name Meaning: call id | Column Description: id number identifying the call \n\tpriority INTEGER, -- Example Values: `0`, `2`, `1` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: priority of the complaint | Value Description: 0, 1, 2, null: not available, higher: -> higher priority, -> more serious/urgent complaint\n\ttype TEXT, -- Example Values: `NW`, `PS`, `NE`, `TT`, `IN` | Value Statics: Total count 3015 - Distinct count 6 - Null count 984 | Column Description: type of complaint \n\toutcome TEXT, -- Example Values: `AGENT`, `HANG`, `PHANTOM` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: the outcome of processing of complaints \n\tserver TEXT, -- Example Values: `('MICHAL',)`, `('TOVA',)`, `('YIFAT',)` | Value Statics: Total count 3015 - Distinct count 25 - Null count 984 | Column Description: server \n\tser_start TEXT, -- Example Values: `('13:34:11',)`, `('10:58:22',)`, `('13:00:54',)` | Value Statics: Total count 3999 - Distinct count 3733 - Null count 0 | Column Name Meaning: server start | Column Description: server start time | Value Description: HH:MM:SS\n\tser_exit TEXT, -- Example Values: `('13:40:23',)`, `('11:16:10',)`, `('13:13:31',)` | Value Statics: Total count 3999 - Distinct count 3738 - Null count 0 | Column Name Meaning: server exit | Column Description: server exit time \n\tser_time TEXT, -- Example Values: `('00:06:12',)`, `('00:17:48',)`, `('00:12:37',)` | Value Statics: Total count 3999 - Distinct count 1303 - Null count 0 | Column Name Meaning: server time | Column Description: server time | Value Description: longer server time referring to more verbose/longer complaint\n\tprimary key (\"Complaint ID\"),\n\tforeign key (\"rand client\") references client(client_id),\n);\n\nCREATE TABLE client\n(\n\tclient_id TEXT primary key,\n\tsex TEXT, -- Example Values: `Female`, `Male` | Value Statics: Total count 5369 - Distinct count 2 - Null count 0 | Column Description: sex of client \n\tday INTEGER, -- Example Values: `(13,)`, `(4,)`, `(9,)` | Value Statics: Total count 5369 - Distinct count 31 - Null count 0 | Column Description: day of the birthday \n\tmonth INTEGER, -- Example Values: `12`, `2`, `10`, `7`, `9` | Value Statics: Total count 5369 - Distinct count 12 - Null count 0 | Column Description: month of the birthday \n\tyear INTEGER, -- Example Values: `(1990,)`, `(1965,)`, `(1960,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: year when is born \n\tage INTEGER, -- Example Values: `(29,)`, `(54,)`, `(59,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: age | Value Description: teenager: 13-19 adult: 19-65 elder: > 65\n\tsocial TEXT, -- Example Values: `('926-93-2157',)`, `('806-94-5725',)`, `('614-70-9100',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: social number | Value Description: ssn: us id number for each person\n\tfirst TEXT, -- Example Values: `('Emma',)`, `('Noah',)`, `('Olivia',)` | Value Statics: Total count 5369 - Distinct count 2885 - Null count 0 | Column Description: first name \n\tmiddle TEXT, -- Example Values: `('Avaya',)`, `('Everest',)`, `('Brooklynne',)` | Value Statics: Total count 5369 - Distinct count 3925 - Null count 0 | Column Description: middle name \n\tlast TEXT, -- Example Values: `('Smith',)`, `('Thompson',)`, `('Johnson',)` | Value Statics: Total count 5369 - Distinct count 1769 - Null count 0 | Column Description: last name \n\tphone TEXT, -- Example Values: `('367-171-6840',)`, `('212-423-7734',)`, `('212-425-6932',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: phone number \n\temail TEXT, -- Example Values: `('emma.smith@gmail.com',)`, `('noah.thompson@gmail.com',)`, `('olivia.johnson@outlook.com',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: email | Value Description: google email / account: @gamil.com microsoft email / account: xxx@outlook.com\n\taddress_1 TEXT, -- Example Values: `('387 Wellington Ave.',)`, `('75 W. Berkshire St.',)`, `('36 Second St.',)` | Value Statics: Total count 5369 - Distinct count 5365 - Null count 0 | Column Description: address 1 \n\taddress_2 TEXT, -- Example Values: `('Unit 1',)`, `('Unit 6',)`, `('Unit 80',)` | Value Statics: Total count 83 - Distinct count 24 - Null count 5286 | Column Description: address 2 | Value Description: entire address = (address_1, address_2)\n\tcity TEXT, -- Example Values: `('Albuquerque',)`, `('New York City',)`, `('Indianapolis',)` | Value Statics: Total count 5369 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `('NM',)`, `('NY',)`, `('IN',)` | Value Statics: Total count 5369 - Distinct count 51 - Null count 0 | Column Description: state code \n\tzipcode INTEGER, -- Example Values: `(47246,)`, `(10040,)`, `(10162,)` | Value Statics: Total count 5369 - Distinct count 3512 - Null count 0 | Column Description: zipcode \n\tdistrict_id INTEGER, -- Example Values: `(18,)`, `(1,)`, `(5,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Name Meaning: district id | Column Description: district id number \n\tforeign key (district_id) references district(district_id),\n);\n\nCREATE TABLE district\n(\n\tdistrict_id INTEGER primary key,\n\tcity TEXT, -- Example Values: `('New York City',)`, `('Jacksonville',)`, `('Columbus',)` | Value Statics: Total count 77 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate_abbrev TEXT, -- Example Values: `('NY',)`, `('FL',)`, `('OH',)` | Value Statics: Total count 77 - Distinct count 51 - Null count 0 | Column Description: state abbreviated code \n\tdivision TEXT, -- Example Values: `Middle Atlantic`, `South Atlantic`, `East North Central`, `Pacific`, `Mountain` | Value Statics: Total count 77 - Distinct count 9 - Null count 0 | Column Description: division \n\tforeign key (state_abbrev) references state(StateCode),\n);\n\nCREATE TABLE events\n(\n\t\"Date received\" DATE, -- Example Values: `('2014-07-03',)`, `('2012-04-12',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1908 - Null count 0 | Column Description: Date received \n\tProduct TEXT, -- Example Values: `Bank account or service`, `Credit card` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: complaining about which product \n\t\"Sub-product\" TEXT, -- Example Values: `Checking account`, `Savings account`, `Other bank product/service`, `(CD) Certificate of deposit`, `Cashing a check without an account` | Value Statics: Total count 14091 - Distinct count 5 - Null count 9328 | Column Description: sub product if exists | Value Description: detailed product\n\tIssue TEXT, -- Example Values: `('Deposits and withdrawals',)`, `('Account opening, closing, or management',)`, `('Billing disputes',)` | Value Statics: Total count 23419 - Distinct count 38 - Null count 0 | Column Description: problems leading to this complaints \n\t\"Sub-issue\" TEXT, -- | Column Description: sub problems leading to this complaints if exists | Value Description: more detailed issue\n\t\"Consumer complaint narrative\" TEXT, -- | Column Description: Consumer complaint narrative \n\tTags TEXT, -- Example Values: `Older American`, `Older American, Servicemember`, `Servicemember` | Value Statics: Total count 3276 - Distinct count 3 - Null count 20143 | Column Description: tags of client \n\t\"Consumer consent provided?\" TEXT, -- Example Values: `N/A`, `Consent not provided`, `Consent provided`, `Other` | Value Statics: Total count 23323 - Distinct count 4 - Null count 96 | Column Name Meaning: Tags Consumer consent provided? | Column Description: whether the tags labeled under permission of the clients | Value Description: null, 'N/A' or empty value: indicating that the company didn't get the permission of consent. if the value is not empty: customers provide the consent for this tag.\n\t\"Submitted via\" TEXT, -- Example Values: `Email`, `Fax`, `Postal mail`, `Referral`, `Web` | Value Statics: Total count 23419 - Distinct count 6 - Null count 0 | Column Description: Submitted via \n\t\"Date sent to company\" TEXT, -- Example Values: `('2014-07-09',)`, `('2012-04-13',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1778 - Null count 0 | Column Description: Date sent to company | Value Description: delay of the complaints = 'Date sent to company'\n\t\"Company response to consumer\" TEXT, -- Example Values: `Closed with explanation`, `Closed with relief`, `Closed without relief`, `Closed with non-monetary relief`, `In progress` | Value Statics: Total count 23419 - Distinct count 8 - Null count 0 | Column Description: Company response to consumer \n\t\"Timely response?\" TEXT, -- Example Values: `Yes`, `No` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: whether the response of the company is timely \n\t\"Consumer disputed?\" TEXT, -- Example Values: `No`, `Yes` | Value Statics: Total count 22417 - Distinct count 2 - Null count 1002 | Column Description: whether the consumer dispute about the response from the company. \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000140',)` | Value Statics: Total count 23419 - Distinct count 23419 - Null count 0 | Column Description: id number indicating which complaint \n\tClient_ID TEXT, -- Example Values: `('C00003714',)`, `('C00001366',)`, `('C00002330',)` | Value Statics: Total count 23419 - Distinct count 5284 - Null count 0 | Column Name Meaning: Client ID | Column Description: id number indicating which client \n\tprimary key (\"Complaint ID\", Client_ID),\n\tforeign key (\"Complaint ID\") references callcenterlogs(\"Complaint ID\"),\n\tforeign key (Client_ID) references client(client_id),\n);\n\nCREATE TABLE reviews\n(\n\t\"Date\" DATE primary key,\n\tStars INTEGER, -- Example Values: `5`, `1`, `2` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tReviews TEXT, -- \n\tProduct TEXT, -- Example Values: `Eagle National Mortgage`, `Eagle National Bank`, `Eagle Capital` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tdistrict_id INTEGER, -- Example Values: `(65,)`, `(66,)`, `(23,)` | Value Statics: Total count 377 - Distinct count 77 - Null count 0 \n\tforeign key (district_id) references district(district_id),\n);",
"question": "In what years were the clients who demanded more problems with Certificate of deposit born?",
"evidence": "more problems with Certificate refers to MAX(COUNT(\"Sub-product\" = '(CD) Certificate of deposit'));"
}
|
{
"db_mode": "train",
"db_id": "retail_complains",
"gt_sql": "SELECT T1.year FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Sub-product` = '(CD) Certificate of deposit' GROUP BY T1.year ORDER BY COUNT(T1.year) DESC LIMIT 1"
}
|
retail_complains
|
321
|
{
"db_schema": "CREATE TABLE state\n(\n\tStateCode TEXT constraint state_pk primary key,\n\tState TEXT, -- Example Values: `('Alabama',)`, `('Arkansas',)`, `('Arizona',)` | Value Statics: Total count 48 - Distinct count 48 - Null count 0 \n\tRegion TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0 \n);\n\nCREATE TABLE callcenterlogs\n(\n\t\"Date received\" DATE, -- Example Values: `('2017-03-27',)`, `('2017-03-23',)`, `('2017-03-22',)` | Value Statics: Total count 3999 - Distinct count 1842 - Null count 0 | Column Description: complaint date \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000175',)` | Value Statics: Total count 2504 - Distinct count 2504 - Null count 1495 | Column Description: unique id number representing each complaint \n\t\"rand client\" TEXT, -- Example Values: `('C00004587',)`, `('C00003328',)`, `('C00001685',)` | Value Statics: Total count 2504 - Distinct count 2019 - Null count 1495 | Column Description: client id \n\tphonefinal TEXT, -- Example Values: `('977-806-9726',)`, `('322-598-7152',)`, `('508-311-5237',)` | Value Statics: Total count 3999 - Distinct count 2744 - Null count 0 | Column Name Meaning: phone final | Column Description: final phone number \n\t\"vru+line\" TEXT, -- Example Values: `('AA0103',)`, `('AA0205',)`, `('AA0110',)` | Value Statics: Total count 3015 - Distinct count 27 - Null count 984 | Column Name Meaning: voice response unit line | Column Description: voice response unit line \n\tcall_id INTEGER, -- Example Values: `(34536,)`, `(34537,)`, `(34538,)` | Value Statics: Total count 3015 - Distinct count 3015 - Null count 984 | Column Name Meaning: call id | Column Description: id number identifying the call \n\tpriority INTEGER, -- Example Values: `0`, `2`, `1` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: priority of the complaint | Value Description: 0, 1, 2, null: not available, higher: -> higher priority, -> more serious/urgent complaint\n\ttype TEXT, -- Example Values: `NW`, `PS`, `NE`, `TT`, `IN` | Value Statics: Total count 3015 - Distinct count 6 - Null count 984 | Column Description: type of complaint \n\toutcome TEXT, -- Example Values: `AGENT`, `HANG`, `PHANTOM` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: the outcome of processing of complaints \n\tserver TEXT, -- Example Values: `('MICHAL',)`, `('TOVA',)`, `('YIFAT',)` | Value Statics: Total count 3015 - Distinct count 25 - Null count 984 | Column Description: server \n\tser_start TEXT, -- Example Values: `('13:34:11',)`, `('10:58:22',)`, `('13:00:54',)` | Value Statics: Total count 3999 - Distinct count 3733 - Null count 0 | Column Name Meaning: server start | Column Description: server start time | Value Description: HH:MM:SS\n\tser_exit TEXT, -- Example Values: `('13:40:23',)`, `('11:16:10',)`, `('13:13:31',)` | Value Statics: Total count 3999 - Distinct count 3738 - Null count 0 | Column Name Meaning: server exit | Column Description: server exit time \n\tser_time TEXT, -- Example Values: `('00:06:12',)`, `('00:17:48',)`, `('00:12:37',)` | Value Statics: Total count 3999 - Distinct count 1303 - Null count 0 | Column Name Meaning: server time | Column Description: server time | Value Description: longer server time referring to more verbose/longer complaint\n\tprimary key (\"Complaint ID\"),\n\tforeign key (\"rand client\") references client(client_id),\n);\n\nCREATE TABLE client\n(\n\tclient_id TEXT primary key,\n\tsex TEXT, -- Example Values: `Female`, `Male` | Value Statics: Total count 5369 - Distinct count 2 - Null count 0 | Column Description: sex of client \n\tday INTEGER, -- Example Values: `(13,)`, `(4,)`, `(9,)` | Value Statics: Total count 5369 - Distinct count 31 - Null count 0 | Column Description: day of the birthday \n\tmonth INTEGER, -- Example Values: `12`, `2`, `10`, `7`, `9` | Value Statics: Total count 5369 - Distinct count 12 - Null count 0 | Column Description: month of the birthday \n\tyear INTEGER, -- Example Values: `(1990,)`, `(1965,)`, `(1960,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: year when is born \n\tage INTEGER, -- Example Values: `(29,)`, `(54,)`, `(59,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: age | Value Description: teenager: 13-19 adult: 19-65 elder: > 65\n\tsocial TEXT, -- Example Values: `('926-93-2157',)`, `('806-94-5725',)`, `('614-70-9100',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: social number | Value Description: ssn: us id number for each person\n\tfirst TEXT, -- Example Values: `('Emma',)`, `('Noah',)`, `('Olivia',)` | Value Statics: Total count 5369 - Distinct count 2885 - Null count 0 | Column Description: first name \n\tmiddle TEXT, -- Example Values: `('Avaya',)`, `('Everest',)`, `('Brooklynne',)` | Value Statics: Total count 5369 - Distinct count 3925 - Null count 0 | Column Description: middle name \n\tlast TEXT, -- Example Values: `('Smith',)`, `('Thompson',)`, `('Johnson',)` | Value Statics: Total count 5369 - Distinct count 1769 - Null count 0 | Column Description: last name \n\tphone TEXT, -- Example Values: `('367-171-6840',)`, `('212-423-7734',)`, `('212-425-6932',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: phone number \n\temail TEXT, -- Example Values: `('emma.smith@gmail.com',)`, `('noah.thompson@gmail.com',)`, `('olivia.johnson@outlook.com',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: email | Value Description: google email / account: @gamil.com microsoft email / account: xxx@outlook.com\n\taddress_1 TEXT, -- Example Values: `('387 Wellington Ave.',)`, `('75 W. Berkshire St.',)`, `('36 Second St.',)` | Value Statics: Total count 5369 - Distinct count 5365 - Null count 0 | Column Description: address 1 \n\taddress_2 TEXT, -- Example Values: `('Unit 1',)`, `('Unit 6',)`, `('Unit 80',)` | Value Statics: Total count 83 - Distinct count 24 - Null count 5286 | Column Description: address 2 | Value Description: entire address = (address_1, address_2)\n\tcity TEXT, -- Example Values: `('Albuquerque',)`, `('New York City',)`, `('Indianapolis',)` | Value Statics: Total count 5369 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `('NM',)`, `('NY',)`, `('IN',)` | Value Statics: Total count 5369 - Distinct count 51 - Null count 0 | Column Description: state code \n\tzipcode INTEGER, -- Example Values: `(47246,)`, `(10040,)`, `(10162,)` | Value Statics: Total count 5369 - Distinct count 3512 - Null count 0 | Column Description: zipcode \n\tdistrict_id INTEGER, -- Example Values: `(18,)`, `(1,)`, `(5,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Name Meaning: district id | Column Description: district id number \n\tforeign key (district_id) references district(district_id),\n);\n\nCREATE TABLE district\n(\n\tdistrict_id INTEGER primary key,\n\tcity TEXT, -- Example Values: `('New York City',)`, `('Jacksonville',)`, `('Columbus',)` | Value Statics: Total count 77 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate_abbrev TEXT, -- Example Values: `('NY',)`, `('FL',)`, `('OH',)` | Value Statics: Total count 77 - Distinct count 51 - Null count 0 | Column Description: state abbreviated code \n\tdivision TEXT, -- Example Values: `Middle Atlantic`, `South Atlantic`, `East North Central`, `Pacific`, `Mountain` | Value Statics: Total count 77 - Distinct count 9 - Null count 0 | Column Description: division \n\tforeign key (state_abbrev) references state(StateCode),\n);\n\nCREATE TABLE events\n(\n\t\"Date received\" DATE, -- Example Values: `('2014-07-03',)`, `('2012-04-12',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1908 - Null count 0 | Column Description: Date received \n\tProduct TEXT, -- Example Values: `Bank account or service`, `Credit card` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: complaining about which product \n\t\"Sub-product\" TEXT, -- Example Values: `Checking account`, `Savings account`, `Other bank product/service`, `(CD) Certificate of deposit`, `Cashing a check without an account` | Value Statics: Total count 14091 - Distinct count 5 - Null count 9328 | Column Description: sub product if exists | Value Description: detailed product\n\tIssue TEXT, -- Example Values: `('Deposits and withdrawals',)`, `('Account opening, closing, or management',)`, `('Billing disputes',)` | Value Statics: Total count 23419 - Distinct count 38 - Null count 0 | Column Description: problems leading to this complaints \n\t\"Sub-issue\" TEXT, -- | Column Description: sub problems leading to this complaints if exists | Value Description: more detailed issue\n\t\"Consumer complaint narrative\" TEXT, -- | Column Description: Consumer complaint narrative \n\tTags TEXT, -- Example Values: `Older American`, `Older American, Servicemember`, `Servicemember` | Value Statics: Total count 3276 - Distinct count 3 - Null count 20143 | Column Description: tags of client \n\t\"Consumer consent provided?\" TEXT, -- Example Values: `N/A`, `Consent not provided`, `Consent provided`, `Other` | Value Statics: Total count 23323 - Distinct count 4 - Null count 96 | Column Name Meaning: Tags Consumer consent provided? | Column Description: whether the tags labeled under permission of the clients | Value Description: null, 'N/A' or empty value: indicating that the company didn't get the permission of consent. if the value is not empty: customers provide the consent for this tag.\n\t\"Submitted via\" TEXT, -- Example Values: `Email`, `Fax`, `Postal mail`, `Referral`, `Web` | Value Statics: Total count 23419 - Distinct count 6 - Null count 0 | Column Description: Submitted via \n\t\"Date sent to company\" TEXT, -- Example Values: `('2014-07-09',)`, `('2012-04-13',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1778 - Null count 0 | Column Description: Date sent to company | Value Description: delay of the complaints = 'Date sent to company'\n\t\"Company response to consumer\" TEXT, -- Example Values: `Closed with explanation`, `Closed with relief`, `Closed without relief`, `Closed with non-monetary relief`, `In progress` | Value Statics: Total count 23419 - Distinct count 8 - Null count 0 | Column Description: Company response to consumer \n\t\"Timely response?\" TEXT, -- Example Values: `Yes`, `No` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: whether the response of the company is timely \n\t\"Consumer disputed?\" TEXT, -- Example Values: `No`, `Yes` | Value Statics: Total count 22417 - Distinct count 2 - Null count 1002 | Column Description: whether the consumer dispute about the response from the company. \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000140',)` | Value Statics: Total count 23419 - Distinct count 23419 - Null count 0 | Column Description: id number indicating which complaint \n\tClient_ID TEXT, -- Example Values: `('C00003714',)`, `('C00001366',)`, `('C00002330',)` | Value Statics: Total count 23419 - Distinct count 5284 - Null count 0 | Column Name Meaning: Client ID | Column Description: id number indicating which client \n\tprimary key (\"Complaint ID\", Client_ID),\n\tforeign key (\"Complaint ID\") references callcenterlogs(\"Complaint ID\"),\n\tforeign key (Client_ID) references client(client_id),\n);\n\nCREATE TABLE reviews\n(\n\t\"Date\" DATE primary key,\n\tStars INTEGER, -- Example Values: `5`, `1`, `2` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tReviews TEXT, -- \n\tProduct TEXT, -- Example Values: `Eagle National Mortgage`, `Eagle National Bank`, `Eagle Capital` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tdistrict_id INTEGER, -- Example Values: `(65,)`, `(66,)`, `(23,)` | Value Statics: Total count 377 - Distinct count 77 - Null count 0 \n\tforeign key (district_id) references district(district_id),\n);",
"question": "How long was Kendall Allen's complaint about her credit card?",
"evidence": "how long refers to ser_time; credit card refers to Product = 'Credit Card';"
}
|
{
"db_mode": "train",
"db_id": "retail_complains",
"gt_sql": "SELECT T3.ser_time FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2.client_id INNER JOIN callcenterlogs AS T3 ON T1.`Complaint ID` = T3.`Complaint ID` WHERE T2.first = 'Kendall' AND T2.last = 'Allen' AND T2.sex = 'Female' AND T1.Product = 'Credit card'"
}
|
retail_complains
|
291
|
{
"db_schema": "CREATE TABLE state\n(\n\tStateCode TEXT constraint state_pk primary key,\n\tState TEXT, -- Example Values: `('Alabama',)`, `('Arkansas',)`, `('Arizona',)` | Value Statics: Total count 48 - Distinct count 48 - Null count 0 \n\tRegion TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0 \n);\n\nCREATE TABLE callcenterlogs\n(\n\t\"Date received\" DATE, -- Example Values: `('2017-03-27',)`, `('2017-03-23',)`, `('2017-03-22',)` | Value Statics: Total count 3999 - Distinct count 1842 - Null count 0 | Column Description: complaint date \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000175',)` | Value Statics: Total count 2504 - Distinct count 2504 - Null count 1495 | Column Description: unique id number representing each complaint \n\t\"rand client\" TEXT, -- Example Values: `('C00004587',)`, `('C00003328',)`, `('C00001685',)` | Value Statics: Total count 2504 - Distinct count 2019 - Null count 1495 | Column Description: client id \n\tphonefinal TEXT, -- Example Values: `('977-806-9726',)`, `('322-598-7152',)`, `('508-311-5237',)` | Value Statics: Total count 3999 - Distinct count 2744 - Null count 0 | Column Name Meaning: phone final | Column Description: final phone number \n\t\"vru+line\" TEXT, -- Example Values: `('AA0103',)`, `('AA0205',)`, `('AA0110',)` | Value Statics: Total count 3015 - Distinct count 27 - Null count 984 | Column Name Meaning: voice response unit line | Column Description: voice response unit line \n\tcall_id INTEGER, -- Example Values: `(34536,)`, `(34537,)`, `(34538,)` | Value Statics: Total count 3015 - Distinct count 3015 - Null count 984 | Column Name Meaning: call id | Column Description: id number identifying the call \n\tpriority INTEGER, -- Example Values: `0`, `2`, `1` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: priority of the complaint | Value Description: 0, 1, 2, null: not available, higher: -> higher priority, -> more serious/urgent complaint\n\ttype TEXT, -- Example Values: `NW`, `PS`, `NE`, `TT`, `IN` | Value Statics: Total count 3015 - Distinct count 6 - Null count 984 | Column Description: type of complaint \n\toutcome TEXT, -- Example Values: `AGENT`, `HANG`, `PHANTOM` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: the outcome of processing of complaints \n\tserver TEXT, -- Example Values: `('MICHAL',)`, `('TOVA',)`, `('YIFAT',)` | Value Statics: Total count 3015 - Distinct count 25 - Null count 984 | Column Description: server \n\tser_start TEXT, -- Example Values: `('13:34:11',)`, `('10:58:22',)`, `('13:00:54',)` | Value Statics: Total count 3999 - Distinct count 3733 - Null count 0 | Column Name Meaning: server start | Column Description: server start time | Value Description: HH:MM:SS\n\tser_exit TEXT, -- Example Values: `('13:40:23',)`, `('11:16:10',)`, `('13:13:31',)` | Value Statics: Total count 3999 - Distinct count 3738 - Null count 0 | Column Name Meaning: server exit | Column Description: server exit time \n\tser_time TEXT, -- Example Values: `('00:06:12',)`, `('00:17:48',)`, `('00:12:37',)` | Value Statics: Total count 3999 - Distinct count 1303 - Null count 0 | Column Name Meaning: server time | Column Description: server time | Value Description: longer server time referring to more verbose/longer complaint\n\tprimary key (\"Complaint ID\"),\n\tforeign key (\"rand client\") references client(client_id),\n);\n\nCREATE TABLE client\n(\n\tclient_id TEXT primary key,\n\tsex TEXT, -- Example Values: `Female`, `Male` | Value Statics: Total count 5369 - Distinct count 2 - Null count 0 | Column Description: sex of client \n\tday INTEGER, -- Example Values: `(13,)`, `(4,)`, `(9,)` | Value Statics: Total count 5369 - Distinct count 31 - Null count 0 | Column Description: day of the birthday \n\tmonth INTEGER, -- Example Values: `12`, `2`, `10`, `7`, `9` | Value Statics: Total count 5369 - Distinct count 12 - Null count 0 | Column Description: month of the birthday \n\tyear INTEGER, -- Example Values: `(1990,)`, `(1965,)`, `(1960,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: year when is born \n\tage INTEGER, -- Example Values: `(29,)`, `(54,)`, `(59,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: age | Value Description: teenager: 13-19 adult: 19-65 elder: > 65\n\tsocial TEXT, -- Example Values: `('926-93-2157',)`, `('806-94-5725',)`, `('614-70-9100',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: social number | Value Description: ssn: us id number for each person\n\tfirst TEXT, -- Example Values: `('Emma',)`, `('Noah',)`, `('Olivia',)` | Value Statics: Total count 5369 - Distinct count 2885 - Null count 0 | Column Description: first name \n\tmiddle TEXT, -- Example Values: `('Avaya',)`, `('Everest',)`, `('Brooklynne',)` | Value Statics: Total count 5369 - Distinct count 3925 - Null count 0 | Column Description: middle name \n\tlast TEXT, -- Example Values: `('Smith',)`, `('Thompson',)`, `('Johnson',)` | Value Statics: Total count 5369 - Distinct count 1769 - Null count 0 | Column Description: last name \n\tphone TEXT, -- Example Values: `('367-171-6840',)`, `('212-423-7734',)`, `('212-425-6932',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: phone number \n\temail TEXT, -- Example Values: `('emma.smith@gmail.com',)`, `('noah.thompson@gmail.com',)`, `('olivia.johnson@outlook.com',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: email | Value Description: google email / account: @gamil.com microsoft email / account: xxx@outlook.com\n\taddress_1 TEXT, -- Example Values: `('387 Wellington Ave.',)`, `('75 W. Berkshire St.',)`, `('36 Second St.',)` | Value Statics: Total count 5369 - Distinct count 5365 - Null count 0 | Column Description: address 1 \n\taddress_2 TEXT, -- Example Values: `('Unit 1',)`, `('Unit 6',)`, `('Unit 80',)` | Value Statics: Total count 83 - Distinct count 24 - Null count 5286 | Column Description: address 2 | Value Description: entire address = (address_1, address_2)\n\tcity TEXT, -- Example Values: `('Albuquerque',)`, `('New York City',)`, `('Indianapolis',)` | Value Statics: Total count 5369 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `('NM',)`, `('NY',)`, `('IN',)` | Value Statics: Total count 5369 - Distinct count 51 - Null count 0 | Column Description: state code \n\tzipcode INTEGER, -- Example Values: `(47246,)`, `(10040,)`, `(10162,)` | Value Statics: Total count 5369 - Distinct count 3512 - Null count 0 | Column Description: zipcode \n\tdistrict_id INTEGER, -- Example Values: `(18,)`, `(1,)`, `(5,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Name Meaning: district id | Column Description: district id number \n\tforeign key (district_id) references district(district_id),\n);\n\nCREATE TABLE district\n(\n\tdistrict_id INTEGER primary key,\n\tcity TEXT, -- Example Values: `('New York City',)`, `('Jacksonville',)`, `('Columbus',)` | Value Statics: Total count 77 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate_abbrev TEXT, -- Example Values: `('NY',)`, `('FL',)`, `('OH',)` | Value Statics: Total count 77 - Distinct count 51 - Null count 0 | Column Description: state abbreviated code \n\tdivision TEXT, -- Example Values: `Middle Atlantic`, `South Atlantic`, `East North Central`, `Pacific`, `Mountain` | Value Statics: Total count 77 - Distinct count 9 - Null count 0 | Column Description: division \n\tforeign key (state_abbrev) references state(StateCode),\n);\n\nCREATE TABLE events\n(\n\t\"Date received\" DATE, -- Example Values: `('2014-07-03',)`, `('2012-04-12',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1908 - Null count 0 | Column Description: Date received \n\tProduct TEXT, -- Example Values: `Bank account or service`, `Credit card` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: complaining about which product \n\t\"Sub-product\" TEXT, -- Example Values: `Checking account`, `Savings account`, `Other bank product/service`, `(CD) Certificate of deposit`, `Cashing a check without an account` | Value Statics: Total count 14091 - Distinct count 5 - Null count 9328 | Column Description: sub product if exists | Value Description: detailed product\n\tIssue TEXT, -- Example Values: `('Deposits and withdrawals',)`, `('Account opening, closing, or management',)`, `('Billing disputes',)` | Value Statics: Total count 23419 - Distinct count 38 - Null count 0 | Column Description: problems leading to this complaints \n\t\"Sub-issue\" TEXT, -- | Column Description: sub problems leading to this complaints if exists | Value Description: more detailed issue\n\t\"Consumer complaint narrative\" TEXT, -- | Column Description: Consumer complaint narrative \n\tTags TEXT, -- Example Values: `Older American`, `Older American, Servicemember`, `Servicemember` | Value Statics: Total count 3276 - Distinct count 3 - Null count 20143 | Column Description: tags of client \n\t\"Consumer consent provided?\" TEXT, -- Example Values: `N/A`, `Consent not provided`, `Consent provided`, `Other` | Value Statics: Total count 23323 - Distinct count 4 - Null count 96 | Column Name Meaning: Tags Consumer consent provided? | Column Description: whether the tags labeled under permission of the clients | Value Description: null, 'N/A' or empty value: indicating that the company didn't get the permission of consent. if the value is not empty: customers provide the consent for this tag.\n\t\"Submitted via\" TEXT, -- Example Values: `Email`, `Fax`, `Postal mail`, `Referral`, `Web` | Value Statics: Total count 23419 - Distinct count 6 - Null count 0 | Column Description: Submitted via \n\t\"Date sent to company\" TEXT, -- Example Values: `('2014-07-09',)`, `('2012-04-13',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1778 - Null count 0 | Column Description: Date sent to company | Value Description: delay of the complaints = 'Date sent to company'\n\t\"Company response to consumer\" TEXT, -- Example Values: `Closed with explanation`, `Closed with relief`, `Closed without relief`, `Closed with non-monetary relief`, `In progress` | Value Statics: Total count 23419 - Distinct count 8 - Null count 0 | Column Description: Company response to consumer \n\t\"Timely response?\" TEXT, -- Example Values: `Yes`, `No` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: whether the response of the company is timely \n\t\"Consumer disputed?\" TEXT, -- Example Values: `No`, `Yes` | Value Statics: Total count 22417 - Distinct count 2 - Null count 1002 | Column Description: whether the consumer dispute about the response from the company. \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000140',)` | Value Statics: Total count 23419 - Distinct count 23419 - Null count 0 | Column Description: id number indicating which complaint \n\tClient_ID TEXT, -- Example Values: `('C00003714',)`, `('C00001366',)`, `('C00002330',)` | Value Statics: Total count 23419 - Distinct count 5284 - Null count 0 | Column Name Meaning: Client ID | Column Description: id number indicating which client \n\tprimary key (\"Complaint ID\", Client_ID),\n\tforeign key (\"Complaint ID\") references callcenterlogs(\"Complaint ID\"),\n\tforeign key (Client_ID) references client(client_id),\n);\n\nCREATE TABLE reviews\n(\n\t\"Date\" DATE primary key,\n\tStars INTEGER, -- Example Values: `5`, `1`, `2` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tReviews TEXT, -- \n\tProduct TEXT, -- Example Values: `Eagle National Mortgage`, `Eagle National Bank`, `Eagle Capital` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tdistrict_id INTEGER, -- Example Values: `(65,)`, `(66,)`, `(23,)` | Value Statics: Total count 377 - Distinct count 77 - Null count 0 \n\tforeign key (district_id) references district(district_id),\n);",
"question": "Identify by their ID all clients who did not give their consent permission.",
"evidence": "did not give their consent permission refers to Consumer consent provided is null, 'N/A', or empty;"
}
|
{
"db_mode": "train",
"db_id": "retail_complains",
"gt_sql": "SELECT Client_ID FROM events WHERE `Consumer consent provided?` = 'N/A' OR 'Consumer consent provided?' IS NULL OR 'Consumer consent provided?' = ''"
}
|
retail_complains
|
249
|
{
"db_schema": "CREATE TABLE state\n(\n\tStateCode TEXT constraint state_pk primary key,\n\tState TEXT, -- Example Values: `('Alabama',)`, `('Arkansas',)`, `('Arizona',)` | Value Statics: Total count 48 - Distinct count 48 - Null count 0 \n\tRegion TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0 \n);\n\nCREATE TABLE callcenterlogs\n(\n\t\"Date received\" DATE, -- Example Values: `('2017-03-27',)`, `('2017-03-23',)`, `('2017-03-22',)` | Value Statics: Total count 3999 - Distinct count 1842 - Null count 0 | Column Description: complaint date \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000175',)` | Value Statics: Total count 2504 - Distinct count 2504 - Null count 1495 | Column Description: unique id number representing each complaint \n\t\"rand client\" TEXT, -- Example Values: `('C00004587',)`, `('C00003328',)`, `('C00001685',)` | Value Statics: Total count 2504 - Distinct count 2019 - Null count 1495 | Column Description: client id \n\tphonefinal TEXT, -- Example Values: `('977-806-9726',)`, `('322-598-7152',)`, `('508-311-5237',)` | Value Statics: Total count 3999 - Distinct count 2744 - Null count 0 | Column Name Meaning: phone final | Column Description: final phone number \n\t\"vru+line\" TEXT, -- Example Values: `('AA0103',)`, `('AA0205',)`, `('AA0110',)` | Value Statics: Total count 3015 - Distinct count 27 - Null count 984 | Column Name Meaning: voice response unit line | Column Description: voice response unit line \n\tcall_id INTEGER, -- Example Values: `(34536,)`, `(34537,)`, `(34538,)` | Value Statics: Total count 3015 - Distinct count 3015 - Null count 984 | Column Name Meaning: call id | Column Description: id number identifying the call \n\tpriority INTEGER, -- Example Values: `0`, `2`, `1` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: priority of the complaint | Value Description: 0, 1, 2, null: not available, higher: -> higher priority, -> more serious/urgent complaint\n\ttype TEXT, -- Example Values: `NW`, `PS`, `NE`, `TT`, `IN` | Value Statics: Total count 3015 - Distinct count 6 - Null count 984 | Column Description: type of complaint \n\toutcome TEXT, -- Example Values: `AGENT`, `HANG`, `PHANTOM` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: the outcome of processing of complaints \n\tserver TEXT, -- Example Values: `('MICHAL',)`, `('TOVA',)`, `('YIFAT',)` | Value Statics: Total count 3015 - Distinct count 25 - Null count 984 | Column Description: server \n\tser_start TEXT, -- Example Values: `('13:34:11',)`, `('10:58:22',)`, `('13:00:54',)` | Value Statics: Total count 3999 - Distinct count 3733 - Null count 0 | Column Name Meaning: server start | Column Description: server start time | Value Description: HH:MM:SS\n\tser_exit TEXT, -- Example Values: `('13:40:23',)`, `('11:16:10',)`, `('13:13:31',)` | Value Statics: Total count 3999 - Distinct count 3738 - Null count 0 | Column Name Meaning: server exit | Column Description: server exit time \n\tser_time TEXT, -- Example Values: `('00:06:12',)`, `('00:17:48',)`, `('00:12:37',)` | Value Statics: Total count 3999 - Distinct count 1303 - Null count 0 | Column Name Meaning: server time | Column Description: server time | Value Description: longer server time referring to more verbose/longer complaint\n\tprimary key (\"Complaint ID\"),\n\tforeign key (\"rand client\") references client(client_id),\n);\n\nCREATE TABLE client\n(\n\tclient_id TEXT primary key,\n\tsex TEXT, -- Example Values: `Female`, `Male` | Value Statics: Total count 5369 - Distinct count 2 - Null count 0 | Column Description: sex of client \n\tday INTEGER, -- Example Values: `(13,)`, `(4,)`, `(9,)` | Value Statics: Total count 5369 - Distinct count 31 - Null count 0 | Column Description: day of the birthday \n\tmonth INTEGER, -- Example Values: `12`, `2`, `10`, `7`, `9` | Value Statics: Total count 5369 - Distinct count 12 - Null count 0 | Column Description: month of the birthday \n\tyear INTEGER, -- Example Values: `(1990,)`, `(1965,)`, `(1960,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: year when is born \n\tage INTEGER, -- Example Values: `(29,)`, `(54,)`, `(59,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: age | Value Description: teenager: 13-19 adult: 19-65 elder: > 65\n\tsocial TEXT, -- Example Values: `('926-93-2157',)`, `('806-94-5725',)`, `('614-70-9100',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: social number | Value Description: ssn: us id number for each person\n\tfirst TEXT, -- Example Values: `('Emma',)`, `('Noah',)`, `('Olivia',)` | Value Statics: Total count 5369 - Distinct count 2885 - Null count 0 | Column Description: first name \n\tmiddle TEXT, -- Example Values: `('Avaya',)`, `('Everest',)`, `('Brooklynne',)` | Value Statics: Total count 5369 - Distinct count 3925 - Null count 0 | Column Description: middle name \n\tlast TEXT, -- Example Values: `('Smith',)`, `('Thompson',)`, `('Johnson',)` | Value Statics: Total count 5369 - Distinct count 1769 - Null count 0 | Column Description: last name \n\tphone TEXT, -- Example Values: `('367-171-6840',)`, `('212-423-7734',)`, `('212-425-6932',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: phone number \n\temail TEXT, -- Example Values: `('emma.smith@gmail.com',)`, `('noah.thompson@gmail.com',)`, `('olivia.johnson@outlook.com',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: email | Value Description: google email / account: @gamil.com microsoft email / account: xxx@outlook.com\n\taddress_1 TEXT, -- Example Values: `('387 Wellington Ave.',)`, `('75 W. Berkshire St.',)`, `('36 Second St.',)` | Value Statics: Total count 5369 - Distinct count 5365 - Null count 0 | Column Description: address 1 \n\taddress_2 TEXT, -- Example Values: `('Unit 1',)`, `('Unit 6',)`, `('Unit 80',)` | Value Statics: Total count 83 - Distinct count 24 - Null count 5286 | Column Description: address 2 | Value Description: entire address = (address_1, address_2)\n\tcity TEXT, -- Example Values: `('Albuquerque',)`, `('New York City',)`, `('Indianapolis',)` | Value Statics: Total count 5369 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `('NM',)`, `('NY',)`, `('IN',)` | Value Statics: Total count 5369 - Distinct count 51 - Null count 0 | Column Description: state code \n\tzipcode INTEGER, -- Example Values: `(47246,)`, `(10040,)`, `(10162,)` | Value Statics: Total count 5369 - Distinct count 3512 - Null count 0 | Column Description: zipcode \n\tdistrict_id INTEGER, -- Example Values: `(18,)`, `(1,)`, `(5,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Name Meaning: district id | Column Description: district id number \n\tforeign key (district_id) references district(district_id),\n);\n\nCREATE TABLE district\n(\n\tdistrict_id INTEGER primary key,\n\tcity TEXT, -- Example Values: `('New York City',)`, `('Jacksonville',)`, `('Columbus',)` | Value Statics: Total count 77 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate_abbrev TEXT, -- Example Values: `('NY',)`, `('FL',)`, `('OH',)` | Value Statics: Total count 77 - Distinct count 51 - Null count 0 | Column Description: state abbreviated code \n\tdivision TEXT, -- Example Values: `Middle Atlantic`, `South Atlantic`, `East North Central`, `Pacific`, `Mountain` | Value Statics: Total count 77 - Distinct count 9 - Null count 0 | Column Description: division \n\tforeign key (state_abbrev) references state(StateCode),\n);\n\nCREATE TABLE events\n(\n\t\"Date received\" DATE, -- Example Values: `('2014-07-03',)`, `('2012-04-12',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1908 - Null count 0 | Column Description: Date received \n\tProduct TEXT, -- Example Values: `Bank account or service`, `Credit card` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: complaining about which product \n\t\"Sub-product\" TEXT, -- Example Values: `Checking account`, `Savings account`, `Other bank product/service`, `(CD) Certificate of deposit`, `Cashing a check without an account` | Value Statics: Total count 14091 - Distinct count 5 - Null count 9328 | Column Description: sub product if exists | Value Description: detailed product\n\tIssue TEXT, -- Example Values: `('Deposits and withdrawals',)`, `('Account opening, closing, or management',)`, `('Billing disputes',)` | Value Statics: Total count 23419 - Distinct count 38 - Null count 0 | Column Description: problems leading to this complaints \n\t\"Sub-issue\" TEXT, -- | Column Description: sub problems leading to this complaints if exists | Value Description: more detailed issue\n\t\"Consumer complaint narrative\" TEXT, -- | Column Description: Consumer complaint narrative \n\tTags TEXT, -- Example Values: `Older American`, `Older American, Servicemember`, `Servicemember` | Value Statics: Total count 3276 - Distinct count 3 - Null count 20143 | Column Description: tags of client \n\t\"Consumer consent provided?\" TEXT, -- Example Values: `N/A`, `Consent not provided`, `Consent provided`, `Other` | Value Statics: Total count 23323 - Distinct count 4 - Null count 96 | Column Name Meaning: Tags Consumer consent provided? | Column Description: whether the tags labeled under permission of the clients | Value Description: null, 'N/A' or empty value: indicating that the company didn't get the permission of consent. if the value is not empty: customers provide the consent for this tag.\n\t\"Submitted via\" TEXT, -- Example Values: `Email`, `Fax`, `Postal mail`, `Referral`, `Web` | Value Statics: Total count 23419 - Distinct count 6 - Null count 0 | Column Description: Submitted via \n\t\"Date sent to company\" TEXT, -- Example Values: `('2014-07-09',)`, `('2012-04-13',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1778 - Null count 0 | Column Description: Date sent to company | Value Description: delay of the complaints = 'Date sent to company'\n\t\"Company response to consumer\" TEXT, -- Example Values: `Closed with explanation`, `Closed with relief`, `Closed without relief`, `Closed with non-monetary relief`, `In progress` | Value Statics: Total count 23419 - Distinct count 8 - Null count 0 | Column Description: Company response to consumer \n\t\"Timely response?\" TEXT, -- Example Values: `Yes`, `No` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: whether the response of the company is timely \n\t\"Consumer disputed?\" TEXT, -- Example Values: `No`, `Yes` | Value Statics: Total count 22417 - Distinct count 2 - Null count 1002 | Column Description: whether the consumer dispute about the response from the company. \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000140',)` | Value Statics: Total count 23419 - Distinct count 23419 - Null count 0 | Column Description: id number indicating which complaint \n\tClient_ID TEXT, -- Example Values: `('C00003714',)`, `('C00001366',)`, `('C00002330',)` | Value Statics: Total count 23419 - Distinct count 5284 - Null count 0 | Column Name Meaning: Client ID | Column Description: id number indicating which client \n\tprimary key (\"Complaint ID\", Client_ID),\n\tforeign key (\"Complaint ID\") references callcenterlogs(\"Complaint ID\"),\n\tforeign key (Client_ID) references client(client_id),\n);\n\nCREATE TABLE reviews\n(\n\t\"Date\" DATE primary key,\n\tStars INTEGER, -- Example Values: `5`, `1`, `2` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tReviews TEXT, -- \n\tProduct TEXT, -- Example Values: `Eagle National Mortgage`, `Eagle National Bank`, `Eagle Capital` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tdistrict_id INTEGER, -- Example Values: `(65,)`, `(66,)`, `(23,)` | Value Statics: Total count 377 - Distinct count 77 - Null count 0 \n\tforeign key (district_id) references district(district_id),\n);",
"question": "For how long did the complaint filed on 2017/3/27 by Rachel Hicks last?",
"evidence": "how long did the complaint filed last refers to ser_time; on 2017/3/27 refers to \"Date received\" = '2017-03-27';"
}
|
{
"db_mode": "train",
"db_id": "retail_complains",
"gt_sql": "SELECT T2.ser_time FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.first = 'Rachel' AND T1.last = 'Hicks' AND T2.`Date received` = '2017-03-27'"
}
|
retail_complains
|
256
|
{
"db_schema": "CREATE TABLE state\n(\n\tStateCode TEXT constraint state_pk primary key,\n\tState TEXT, -- Example Values: `('Alabama',)`, `('Arkansas',)`, `('Arizona',)` | Value Statics: Total count 48 - Distinct count 48 - Null count 0 \n\tRegion TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0 \n);\n\nCREATE TABLE callcenterlogs\n(\n\t\"Date received\" DATE, -- Example Values: `('2017-03-27',)`, `('2017-03-23',)`, `('2017-03-22',)` | Value Statics: Total count 3999 - Distinct count 1842 - Null count 0 | Column Description: complaint date \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000175',)` | Value Statics: Total count 2504 - Distinct count 2504 - Null count 1495 | Column Description: unique id number representing each complaint \n\t\"rand client\" TEXT, -- Example Values: `('C00004587',)`, `('C00003328',)`, `('C00001685',)` | Value Statics: Total count 2504 - Distinct count 2019 - Null count 1495 | Column Description: client id \n\tphonefinal TEXT, -- Example Values: `('977-806-9726',)`, `('322-598-7152',)`, `('508-311-5237',)` | Value Statics: Total count 3999 - Distinct count 2744 - Null count 0 | Column Name Meaning: phone final | Column Description: final phone number \n\t\"vru+line\" TEXT, -- Example Values: `('AA0103',)`, `('AA0205',)`, `('AA0110',)` | Value Statics: Total count 3015 - Distinct count 27 - Null count 984 | Column Name Meaning: voice response unit line | Column Description: voice response unit line \n\tcall_id INTEGER, -- Example Values: `(34536,)`, `(34537,)`, `(34538,)` | Value Statics: Total count 3015 - Distinct count 3015 - Null count 984 | Column Name Meaning: call id | Column Description: id number identifying the call \n\tpriority INTEGER, -- Example Values: `0`, `2`, `1` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: priority of the complaint | Value Description: 0, 1, 2, null: not available, higher: -> higher priority, -> more serious/urgent complaint\n\ttype TEXT, -- Example Values: `NW`, `PS`, `NE`, `TT`, `IN` | Value Statics: Total count 3015 - Distinct count 6 - Null count 984 | Column Description: type of complaint \n\toutcome TEXT, -- Example Values: `AGENT`, `HANG`, `PHANTOM` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: the outcome of processing of complaints \n\tserver TEXT, -- Example Values: `('MICHAL',)`, `('TOVA',)`, `('YIFAT',)` | Value Statics: Total count 3015 - Distinct count 25 - Null count 984 | Column Description: server \n\tser_start TEXT, -- Example Values: `('13:34:11',)`, `('10:58:22',)`, `('13:00:54',)` | Value Statics: Total count 3999 - Distinct count 3733 - Null count 0 | Column Name Meaning: server start | Column Description: server start time | Value Description: HH:MM:SS\n\tser_exit TEXT, -- Example Values: `('13:40:23',)`, `('11:16:10',)`, `('13:13:31',)` | Value Statics: Total count 3999 - Distinct count 3738 - Null count 0 | Column Name Meaning: server exit | Column Description: server exit time \n\tser_time TEXT, -- Example Values: `('00:06:12',)`, `('00:17:48',)`, `('00:12:37',)` | Value Statics: Total count 3999 - Distinct count 1303 - Null count 0 | Column Name Meaning: server time | Column Description: server time | Value Description: longer server time referring to more verbose/longer complaint\n\tprimary key (\"Complaint ID\"),\n\tforeign key (\"rand client\") references client(client_id),\n);\n\nCREATE TABLE client\n(\n\tclient_id TEXT primary key,\n\tsex TEXT, -- Example Values: `Female`, `Male` | Value Statics: Total count 5369 - Distinct count 2 - Null count 0 | Column Description: sex of client \n\tday INTEGER, -- Example Values: `(13,)`, `(4,)`, `(9,)` | Value Statics: Total count 5369 - Distinct count 31 - Null count 0 | Column Description: day of the birthday \n\tmonth INTEGER, -- Example Values: `12`, `2`, `10`, `7`, `9` | Value Statics: Total count 5369 - Distinct count 12 - Null count 0 | Column Description: month of the birthday \n\tyear INTEGER, -- Example Values: `(1990,)`, `(1965,)`, `(1960,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: year when is born \n\tage INTEGER, -- Example Values: `(29,)`, `(54,)`, `(59,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: age | Value Description: teenager: 13-19 adult: 19-65 elder: > 65\n\tsocial TEXT, -- Example Values: `('926-93-2157',)`, `('806-94-5725',)`, `('614-70-9100',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: social number | Value Description: ssn: us id number for each person\n\tfirst TEXT, -- Example Values: `('Emma',)`, `('Noah',)`, `('Olivia',)` | Value Statics: Total count 5369 - Distinct count 2885 - Null count 0 | Column Description: first name \n\tmiddle TEXT, -- Example Values: `('Avaya',)`, `('Everest',)`, `('Brooklynne',)` | Value Statics: Total count 5369 - Distinct count 3925 - Null count 0 | Column Description: middle name \n\tlast TEXT, -- Example Values: `('Smith',)`, `('Thompson',)`, `('Johnson',)` | Value Statics: Total count 5369 - Distinct count 1769 - Null count 0 | Column Description: last name \n\tphone TEXT, -- Example Values: `('367-171-6840',)`, `('212-423-7734',)`, `('212-425-6932',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: phone number \n\temail TEXT, -- Example Values: `('emma.smith@gmail.com',)`, `('noah.thompson@gmail.com',)`, `('olivia.johnson@outlook.com',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: email | Value Description: google email / account: @gamil.com microsoft email / account: xxx@outlook.com\n\taddress_1 TEXT, -- Example Values: `('387 Wellington Ave.',)`, `('75 W. Berkshire St.',)`, `('36 Second St.',)` | Value Statics: Total count 5369 - Distinct count 5365 - Null count 0 | Column Description: address 1 \n\taddress_2 TEXT, -- Example Values: `('Unit 1',)`, `('Unit 6',)`, `('Unit 80',)` | Value Statics: Total count 83 - Distinct count 24 - Null count 5286 | Column Description: address 2 | Value Description: entire address = (address_1, address_2)\n\tcity TEXT, -- Example Values: `('Albuquerque',)`, `('New York City',)`, `('Indianapolis',)` | Value Statics: Total count 5369 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `('NM',)`, `('NY',)`, `('IN',)` | Value Statics: Total count 5369 - Distinct count 51 - Null count 0 | Column Description: state code \n\tzipcode INTEGER, -- Example Values: `(47246,)`, `(10040,)`, `(10162,)` | Value Statics: Total count 5369 - Distinct count 3512 - Null count 0 | Column Description: zipcode \n\tdistrict_id INTEGER, -- Example Values: `(18,)`, `(1,)`, `(5,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Name Meaning: district id | Column Description: district id number \n\tforeign key (district_id) references district(district_id),\n);\n\nCREATE TABLE district\n(\n\tdistrict_id INTEGER primary key,\n\tcity TEXT, -- Example Values: `('New York City',)`, `('Jacksonville',)`, `('Columbus',)` | Value Statics: Total count 77 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate_abbrev TEXT, -- Example Values: `('NY',)`, `('FL',)`, `('OH',)` | Value Statics: Total count 77 - Distinct count 51 - Null count 0 | Column Description: state abbreviated code \n\tdivision TEXT, -- Example Values: `Middle Atlantic`, `South Atlantic`, `East North Central`, `Pacific`, `Mountain` | Value Statics: Total count 77 - Distinct count 9 - Null count 0 | Column Description: division \n\tforeign key (state_abbrev) references state(StateCode),\n);\n\nCREATE TABLE events\n(\n\t\"Date received\" DATE, -- Example Values: `('2014-07-03',)`, `('2012-04-12',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1908 - Null count 0 | Column Description: Date received \n\tProduct TEXT, -- Example Values: `Bank account or service`, `Credit card` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: complaining about which product \n\t\"Sub-product\" TEXT, -- Example Values: `Checking account`, `Savings account`, `Other bank product/service`, `(CD) Certificate of deposit`, `Cashing a check without an account` | Value Statics: Total count 14091 - Distinct count 5 - Null count 9328 | Column Description: sub product if exists | Value Description: detailed product\n\tIssue TEXT, -- Example Values: `('Deposits and withdrawals',)`, `('Account opening, closing, or management',)`, `('Billing disputes',)` | Value Statics: Total count 23419 - Distinct count 38 - Null count 0 | Column Description: problems leading to this complaints \n\t\"Sub-issue\" TEXT, -- | Column Description: sub problems leading to this complaints if exists | Value Description: more detailed issue\n\t\"Consumer complaint narrative\" TEXT, -- | Column Description: Consumer complaint narrative \n\tTags TEXT, -- Example Values: `Older American`, `Older American, Servicemember`, `Servicemember` | Value Statics: Total count 3276 - Distinct count 3 - Null count 20143 | Column Description: tags of client \n\t\"Consumer consent provided?\" TEXT, -- Example Values: `N/A`, `Consent not provided`, `Consent provided`, `Other` | Value Statics: Total count 23323 - Distinct count 4 - Null count 96 | Column Name Meaning: Tags Consumer consent provided? | Column Description: whether the tags labeled under permission of the clients | Value Description: null, 'N/A' or empty value: indicating that the company didn't get the permission of consent. if the value is not empty: customers provide the consent for this tag.\n\t\"Submitted via\" TEXT, -- Example Values: `Email`, `Fax`, `Postal mail`, `Referral`, `Web` | Value Statics: Total count 23419 - Distinct count 6 - Null count 0 | Column Description: Submitted via \n\t\"Date sent to company\" TEXT, -- Example Values: `('2014-07-09',)`, `('2012-04-13',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1778 - Null count 0 | Column Description: Date sent to company | Value Description: delay of the complaints = 'Date sent to company'\n\t\"Company response to consumer\" TEXT, -- Example Values: `Closed with explanation`, `Closed with relief`, `Closed without relief`, `Closed with non-monetary relief`, `In progress` | Value Statics: Total count 23419 - Distinct count 8 - Null count 0 | Column Description: Company response to consumer \n\t\"Timely response?\" TEXT, -- Example Values: `Yes`, `No` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: whether the response of the company is timely \n\t\"Consumer disputed?\" TEXT, -- Example Values: `No`, `Yes` | Value Statics: Total count 22417 - Distinct count 2 - Null count 1002 | Column Description: whether the consumer dispute about the response from the company. \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000140',)` | Value Statics: Total count 23419 - Distinct count 23419 - Null count 0 | Column Description: id number indicating which complaint \n\tClient_ID TEXT, -- Example Values: `('C00003714',)`, `('C00001366',)`, `('C00002330',)` | Value Statics: Total count 23419 - Distinct count 5284 - Null count 0 | Column Name Meaning: Client ID | Column Description: id number indicating which client \n\tprimary key (\"Complaint ID\", Client_ID),\n\tforeign key (\"Complaint ID\") references callcenterlogs(\"Complaint ID\"),\n\tforeign key (Client_ID) references client(client_id),\n);\n\nCREATE TABLE reviews\n(\n\t\"Date\" DATE primary key,\n\tStars INTEGER, -- Example Values: `5`, `1`, `2` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tReviews TEXT, -- \n\tProduct TEXT, -- Example Values: `Eagle National Mortgage`, `Eagle National Bank`, `Eagle Capital` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tdistrict_id INTEGER, -- Example Values: `(65,)`, `(66,)`, `(23,)` | Value Statics: Total count 377 - Distinct count 77 - Null count 0 \n\tforeign key (district_id) references district(district_id),\n);",
"question": "What is the average number of complaints on credit cards filed by clients from New York in the 3 consecutive years starting from 2015?",
"evidence": "average = AVG(Complaint ID); credit cards refers to Product = 'Credit card'; New York refers to city = 'New York'; 3 consecutive years starting from 2015 refers to \"Date received\" BETWEEN 2015 AND 2017;"
}
|
{
"db_mode": "train",
"db_id": "retail_complains",
"gt_sql": "SELECT CAST(COUNT(T2.`Complaint ID`) AS REAL) / 3 AS average FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) BETWEEN '2015' AND '2017' AND T1.city = 'New York City' AND T2.Product = 'Credit card'"
}
|
retail_complains
|
318
|
{
"db_schema": "CREATE TABLE state\n(\n\tStateCode TEXT constraint state_pk primary key,\n\tState TEXT, -- Example Values: `('Alabama',)`, `('Arkansas',)`, `('Arizona',)` | Value Statics: Total count 48 - Distinct count 48 - Null count 0 \n\tRegion TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0 \n);\n\nCREATE TABLE callcenterlogs\n(\n\t\"Date received\" DATE, -- Example Values: `('2017-03-27',)`, `('2017-03-23',)`, `('2017-03-22',)` | Value Statics: Total count 3999 - Distinct count 1842 - Null count 0 | Column Description: complaint date \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000175',)` | Value Statics: Total count 2504 - Distinct count 2504 - Null count 1495 | Column Description: unique id number representing each complaint \n\t\"rand client\" TEXT, -- Example Values: `('C00004587',)`, `('C00003328',)`, `('C00001685',)` | Value Statics: Total count 2504 - Distinct count 2019 - Null count 1495 | Column Description: client id \n\tphonefinal TEXT, -- Example Values: `('977-806-9726',)`, `('322-598-7152',)`, `('508-311-5237',)` | Value Statics: Total count 3999 - Distinct count 2744 - Null count 0 | Column Name Meaning: phone final | Column Description: final phone number \n\t\"vru+line\" TEXT, -- Example Values: `('AA0103',)`, `('AA0205',)`, `('AA0110',)` | Value Statics: Total count 3015 - Distinct count 27 - Null count 984 | Column Name Meaning: voice response unit line | Column Description: voice response unit line \n\tcall_id INTEGER, -- Example Values: `(34536,)`, `(34537,)`, `(34538,)` | Value Statics: Total count 3015 - Distinct count 3015 - Null count 984 | Column Name Meaning: call id | Column Description: id number identifying the call \n\tpriority INTEGER, -- Example Values: `0`, `2`, `1` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: priority of the complaint | Value Description: 0, 1, 2, null: not available, higher: -> higher priority, -> more serious/urgent complaint\n\ttype TEXT, -- Example Values: `NW`, `PS`, `NE`, `TT`, `IN` | Value Statics: Total count 3015 - Distinct count 6 - Null count 984 | Column Description: type of complaint \n\toutcome TEXT, -- Example Values: `AGENT`, `HANG`, `PHANTOM` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: the outcome of processing of complaints \n\tserver TEXT, -- Example Values: `('MICHAL',)`, `('TOVA',)`, `('YIFAT',)` | Value Statics: Total count 3015 - Distinct count 25 - Null count 984 | Column Description: server \n\tser_start TEXT, -- Example Values: `('13:34:11',)`, `('10:58:22',)`, `('13:00:54',)` | Value Statics: Total count 3999 - Distinct count 3733 - Null count 0 | Column Name Meaning: server start | Column Description: server start time | Value Description: HH:MM:SS\n\tser_exit TEXT, -- Example Values: `('13:40:23',)`, `('11:16:10',)`, `('13:13:31',)` | Value Statics: Total count 3999 - Distinct count 3738 - Null count 0 | Column Name Meaning: server exit | Column Description: server exit time \n\tser_time TEXT, -- Example Values: `('00:06:12',)`, `('00:17:48',)`, `('00:12:37',)` | Value Statics: Total count 3999 - Distinct count 1303 - Null count 0 | Column Name Meaning: server time | Column Description: server time | Value Description: longer server time referring to more verbose/longer complaint\n\tprimary key (\"Complaint ID\"),\n\tforeign key (\"rand client\") references client(client_id),\n);\n\nCREATE TABLE client\n(\n\tclient_id TEXT primary key,\n\tsex TEXT, -- Example Values: `Female`, `Male` | Value Statics: Total count 5369 - Distinct count 2 - Null count 0 | Column Description: sex of client \n\tday INTEGER, -- Example Values: `(13,)`, `(4,)`, `(9,)` | Value Statics: Total count 5369 - Distinct count 31 - Null count 0 | Column Description: day of the birthday \n\tmonth INTEGER, -- Example Values: `12`, `2`, `10`, `7`, `9` | Value Statics: Total count 5369 - Distinct count 12 - Null count 0 | Column Description: month of the birthday \n\tyear INTEGER, -- Example Values: `(1990,)`, `(1965,)`, `(1960,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: year when is born \n\tage INTEGER, -- Example Values: `(29,)`, `(54,)`, `(59,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: age | Value Description: teenager: 13-19 adult: 19-65 elder: > 65\n\tsocial TEXT, -- Example Values: `('926-93-2157',)`, `('806-94-5725',)`, `('614-70-9100',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: social number | Value Description: ssn: us id number for each person\n\tfirst TEXT, -- Example Values: `('Emma',)`, `('Noah',)`, `('Olivia',)` | Value Statics: Total count 5369 - Distinct count 2885 - Null count 0 | Column Description: first name \n\tmiddle TEXT, -- Example Values: `('Avaya',)`, `('Everest',)`, `('Brooklynne',)` | Value Statics: Total count 5369 - Distinct count 3925 - Null count 0 | Column Description: middle name \n\tlast TEXT, -- Example Values: `('Smith',)`, `('Thompson',)`, `('Johnson',)` | Value Statics: Total count 5369 - Distinct count 1769 - Null count 0 | Column Description: last name \n\tphone TEXT, -- Example Values: `('367-171-6840',)`, `('212-423-7734',)`, `('212-425-6932',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: phone number \n\temail TEXT, -- Example Values: `('emma.smith@gmail.com',)`, `('noah.thompson@gmail.com',)`, `('olivia.johnson@outlook.com',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: email | Value Description: google email / account: @gamil.com microsoft email / account: xxx@outlook.com\n\taddress_1 TEXT, -- Example Values: `('387 Wellington Ave.',)`, `('75 W. Berkshire St.',)`, `('36 Second St.',)` | Value Statics: Total count 5369 - Distinct count 5365 - Null count 0 | Column Description: address 1 \n\taddress_2 TEXT, -- Example Values: `('Unit 1',)`, `('Unit 6',)`, `('Unit 80',)` | Value Statics: Total count 83 - Distinct count 24 - Null count 5286 | Column Description: address 2 | Value Description: entire address = (address_1, address_2)\n\tcity TEXT, -- Example Values: `('Albuquerque',)`, `('New York City',)`, `('Indianapolis',)` | Value Statics: Total count 5369 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `('NM',)`, `('NY',)`, `('IN',)` | Value Statics: Total count 5369 - Distinct count 51 - Null count 0 | Column Description: state code \n\tzipcode INTEGER, -- Example Values: `(47246,)`, `(10040,)`, `(10162,)` | Value Statics: Total count 5369 - Distinct count 3512 - Null count 0 | Column Description: zipcode \n\tdistrict_id INTEGER, -- Example Values: `(18,)`, `(1,)`, `(5,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Name Meaning: district id | Column Description: district id number \n\tforeign key (district_id) references district(district_id),\n);\n\nCREATE TABLE district\n(\n\tdistrict_id INTEGER primary key,\n\tcity TEXT, -- Example Values: `('New York City',)`, `('Jacksonville',)`, `('Columbus',)` | Value Statics: Total count 77 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate_abbrev TEXT, -- Example Values: `('NY',)`, `('FL',)`, `('OH',)` | Value Statics: Total count 77 - Distinct count 51 - Null count 0 | Column Description: state abbreviated code \n\tdivision TEXT, -- Example Values: `Middle Atlantic`, `South Atlantic`, `East North Central`, `Pacific`, `Mountain` | Value Statics: Total count 77 - Distinct count 9 - Null count 0 | Column Description: division \n\tforeign key (state_abbrev) references state(StateCode),\n);\n\nCREATE TABLE events\n(\n\t\"Date received\" DATE, -- Example Values: `('2014-07-03',)`, `('2012-04-12',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1908 - Null count 0 | Column Description: Date received \n\tProduct TEXT, -- Example Values: `Bank account or service`, `Credit card` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: complaining about which product \n\t\"Sub-product\" TEXT, -- Example Values: `Checking account`, `Savings account`, `Other bank product/service`, `(CD) Certificate of deposit`, `Cashing a check without an account` | Value Statics: Total count 14091 - Distinct count 5 - Null count 9328 | Column Description: sub product if exists | Value Description: detailed product\n\tIssue TEXT, -- Example Values: `('Deposits and withdrawals',)`, `('Account opening, closing, or management',)`, `('Billing disputes',)` | Value Statics: Total count 23419 - Distinct count 38 - Null count 0 | Column Description: problems leading to this complaints \n\t\"Sub-issue\" TEXT, -- | Column Description: sub problems leading to this complaints if exists | Value Description: more detailed issue\n\t\"Consumer complaint narrative\" TEXT, -- | Column Description: Consumer complaint narrative \n\tTags TEXT, -- Example Values: `Older American`, `Older American, Servicemember`, `Servicemember` | Value Statics: Total count 3276 - Distinct count 3 - Null count 20143 | Column Description: tags of client \n\t\"Consumer consent provided?\" TEXT, -- Example Values: `N/A`, `Consent not provided`, `Consent provided`, `Other` | Value Statics: Total count 23323 - Distinct count 4 - Null count 96 | Column Name Meaning: Tags Consumer consent provided? | Column Description: whether the tags labeled under permission of the clients | Value Description: null, 'N/A' or empty value: indicating that the company didn't get the permission of consent. if the value is not empty: customers provide the consent for this tag.\n\t\"Submitted via\" TEXT, -- Example Values: `Email`, `Fax`, `Postal mail`, `Referral`, `Web` | Value Statics: Total count 23419 - Distinct count 6 - Null count 0 | Column Description: Submitted via \n\t\"Date sent to company\" TEXT, -- Example Values: `('2014-07-09',)`, `('2012-04-13',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1778 - Null count 0 | Column Description: Date sent to company | Value Description: delay of the complaints = 'Date sent to company'\n\t\"Company response to consumer\" TEXT, -- Example Values: `Closed with explanation`, `Closed with relief`, `Closed without relief`, `Closed with non-monetary relief`, `In progress` | Value Statics: Total count 23419 - Distinct count 8 - Null count 0 | Column Description: Company response to consumer \n\t\"Timely response?\" TEXT, -- Example Values: `Yes`, `No` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: whether the response of the company is timely \n\t\"Consumer disputed?\" TEXT, -- Example Values: `No`, `Yes` | Value Statics: Total count 22417 - Distinct count 2 - Null count 1002 | Column Description: whether the consumer dispute about the response from the company. \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000140',)` | Value Statics: Total count 23419 - Distinct count 23419 - Null count 0 | Column Description: id number indicating which complaint \n\tClient_ID TEXT, -- Example Values: `('C00003714',)`, `('C00001366',)`, `('C00002330',)` | Value Statics: Total count 23419 - Distinct count 5284 - Null count 0 | Column Name Meaning: Client ID | Column Description: id number indicating which client \n\tprimary key (\"Complaint ID\", Client_ID),\n\tforeign key (\"Complaint ID\") references callcenterlogs(\"Complaint ID\"),\n\tforeign key (Client_ID) references client(client_id),\n);\n\nCREATE TABLE reviews\n(\n\t\"Date\" DATE primary key,\n\tStars INTEGER, -- Example Values: `5`, `1`, `2` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tReviews TEXT, -- \n\tProduct TEXT, -- Example Values: `Eagle National Mortgage`, `Eagle National Bank`, `Eagle Capital` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tdistrict_id INTEGER, -- Example Values: `(65,)`, `(66,)`, `(23,)` | Value Statics: Total count 377 - Distinct count 77 - Null count 0 \n\tforeign key (district_id) references district(district_id),\n);",
"question": "Which region does Noah Thompson live in?",
"evidence": ""
}
|
{
"db_mode": "train",
"db_id": "retail_complains",
"gt_sql": "SELECT T2.division FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.first = 'Noah' AND T1.last = 'Thompson'"
}
|
retail_complains
|
283
|
{
"db_schema": "CREATE TABLE state\n(\n\tStateCode TEXT constraint state_pk primary key,\n\tState TEXT, -- Example Values: `('Alabama',)`, `('Arkansas',)`, `('Arizona',)` | Value Statics: Total count 48 - Distinct count 48 - Null count 0 \n\tRegion TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0 \n);\n\nCREATE TABLE callcenterlogs\n(\n\t\"Date received\" DATE, -- Example Values: `('2017-03-27',)`, `('2017-03-23',)`, `('2017-03-22',)` | Value Statics: Total count 3999 - Distinct count 1842 - Null count 0 | Column Description: complaint date \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000175',)` | Value Statics: Total count 2504 - Distinct count 2504 - Null count 1495 | Column Description: unique id number representing each complaint \n\t\"rand client\" TEXT, -- Example Values: `('C00004587',)`, `('C00003328',)`, `('C00001685',)` | Value Statics: Total count 2504 - Distinct count 2019 - Null count 1495 | Column Description: client id \n\tphonefinal TEXT, -- Example Values: `('977-806-9726',)`, `('322-598-7152',)`, `('508-311-5237',)` | Value Statics: Total count 3999 - Distinct count 2744 - Null count 0 | Column Name Meaning: phone final | Column Description: final phone number \n\t\"vru+line\" TEXT, -- Example Values: `('AA0103',)`, `('AA0205',)`, `('AA0110',)` | Value Statics: Total count 3015 - Distinct count 27 - Null count 984 | Column Name Meaning: voice response unit line | Column Description: voice response unit line \n\tcall_id INTEGER, -- Example Values: `(34536,)`, `(34537,)`, `(34538,)` | Value Statics: Total count 3015 - Distinct count 3015 - Null count 984 | Column Name Meaning: call id | Column Description: id number identifying the call \n\tpriority INTEGER, -- Example Values: `0`, `2`, `1` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: priority of the complaint | Value Description: 0, 1, 2, null: not available, higher: -> higher priority, -> more serious/urgent complaint\n\ttype TEXT, -- Example Values: `NW`, `PS`, `NE`, `TT`, `IN` | Value Statics: Total count 3015 - Distinct count 6 - Null count 984 | Column Description: type of complaint \n\toutcome TEXT, -- Example Values: `AGENT`, `HANG`, `PHANTOM` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: the outcome of processing of complaints \n\tserver TEXT, -- Example Values: `('MICHAL',)`, `('TOVA',)`, `('YIFAT',)` | Value Statics: Total count 3015 - Distinct count 25 - Null count 984 | Column Description: server \n\tser_start TEXT, -- Example Values: `('13:34:11',)`, `('10:58:22',)`, `('13:00:54',)` | Value Statics: Total count 3999 - Distinct count 3733 - Null count 0 | Column Name Meaning: server start | Column Description: server start time | Value Description: HH:MM:SS\n\tser_exit TEXT, -- Example Values: `('13:40:23',)`, `('11:16:10',)`, `('13:13:31',)` | Value Statics: Total count 3999 - Distinct count 3738 - Null count 0 | Column Name Meaning: server exit | Column Description: server exit time \n\tser_time TEXT, -- Example Values: `('00:06:12',)`, `('00:17:48',)`, `('00:12:37',)` | Value Statics: Total count 3999 - Distinct count 1303 - Null count 0 | Column Name Meaning: server time | Column Description: server time | Value Description: longer server time referring to more verbose/longer complaint\n\tprimary key (\"Complaint ID\"),\n\tforeign key (\"rand client\") references client(client_id),\n);\n\nCREATE TABLE client\n(\n\tclient_id TEXT primary key,\n\tsex TEXT, -- Example Values: `Female`, `Male` | Value Statics: Total count 5369 - Distinct count 2 - Null count 0 | Column Description: sex of client \n\tday INTEGER, -- Example Values: `(13,)`, `(4,)`, `(9,)` | Value Statics: Total count 5369 - Distinct count 31 - Null count 0 | Column Description: day of the birthday \n\tmonth INTEGER, -- Example Values: `12`, `2`, `10`, `7`, `9` | Value Statics: Total count 5369 - Distinct count 12 - Null count 0 | Column Description: month of the birthday \n\tyear INTEGER, -- Example Values: `(1990,)`, `(1965,)`, `(1960,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: year when is born \n\tage INTEGER, -- Example Values: `(29,)`, `(54,)`, `(59,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: age | Value Description: teenager: 13-19 adult: 19-65 elder: > 65\n\tsocial TEXT, -- Example Values: `('926-93-2157',)`, `('806-94-5725',)`, `('614-70-9100',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: social number | Value Description: ssn: us id number for each person\n\tfirst TEXT, -- Example Values: `('Emma',)`, `('Noah',)`, `('Olivia',)` | Value Statics: Total count 5369 - Distinct count 2885 - Null count 0 | Column Description: first name \n\tmiddle TEXT, -- Example Values: `('Avaya',)`, `('Everest',)`, `('Brooklynne',)` | Value Statics: Total count 5369 - Distinct count 3925 - Null count 0 | Column Description: middle name \n\tlast TEXT, -- Example Values: `('Smith',)`, `('Thompson',)`, `('Johnson',)` | Value Statics: Total count 5369 - Distinct count 1769 - Null count 0 | Column Description: last name \n\tphone TEXT, -- Example Values: `('367-171-6840',)`, `('212-423-7734',)`, `('212-425-6932',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: phone number \n\temail TEXT, -- Example Values: `('emma.smith@gmail.com',)`, `('noah.thompson@gmail.com',)`, `('olivia.johnson@outlook.com',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: email | Value Description: google email / account: @gamil.com microsoft email / account: xxx@outlook.com\n\taddress_1 TEXT, -- Example Values: `('387 Wellington Ave.',)`, `('75 W. Berkshire St.',)`, `('36 Second St.',)` | Value Statics: Total count 5369 - Distinct count 5365 - Null count 0 | Column Description: address 1 \n\taddress_2 TEXT, -- Example Values: `('Unit 1',)`, `('Unit 6',)`, `('Unit 80',)` | Value Statics: Total count 83 - Distinct count 24 - Null count 5286 | Column Description: address 2 | Value Description: entire address = (address_1, address_2)\n\tcity TEXT, -- Example Values: `('Albuquerque',)`, `('New York City',)`, `('Indianapolis',)` | Value Statics: Total count 5369 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `('NM',)`, `('NY',)`, `('IN',)` | Value Statics: Total count 5369 - Distinct count 51 - Null count 0 | Column Description: state code \n\tzipcode INTEGER, -- Example Values: `(47246,)`, `(10040,)`, `(10162,)` | Value Statics: Total count 5369 - Distinct count 3512 - Null count 0 | Column Description: zipcode \n\tdistrict_id INTEGER, -- Example Values: `(18,)`, `(1,)`, `(5,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Name Meaning: district id | Column Description: district id number \n\tforeign key (district_id) references district(district_id),\n);\n\nCREATE TABLE district\n(\n\tdistrict_id INTEGER primary key,\n\tcity TEXT, -- Example Values: `('New York City',)`, `('Jacksonville',)`, `('Columbus',)` | Value Statics: Total count 77 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate_abbrev TEXT, -- Example Values: `('NY',)`, `('FL',)`, `('OH',)` | Value Statics: Total count 77 - Distinct count 51 - Null count 0 | Column Description: state abbreviated code \n\tdivision TEXT, -- Example Values: `Middle Atlantic`, `South Atlantic`, `East North Central`, `Pacific`, `Mountain` | Value Statics: Total count 77 - Distinct count 9 - Null count 0 | Column Description: division \n\tforeign key (state_abbrev) references state(StateCode),\n);\n\nCREATE TABLE events\n(\n\t\"Date received\" DATE, -- Example Values: `('2014-07-03',)`, `('2012-04-12',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1908 - Null count 0 | Column Description: Date received \n\tProduct TEXT, -- Example Values: `Bank account or service`, `Credit card` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: complaining about which product \n\t\"Sub-product\" TEXT, -- Example Values: `Checking account`, `Savings account`, `Other bank product/service`, `(CD) Certificate of deposit`, `Cashing a check without an account` | Value Statics: Total count 14091 - Distinct count 5 - Null count 9328 | Column Description: sub product if exists | Value Description: detailed product\n\tIssue TEXT, -- Example Values: `('Deposits and withdrawals',)`, `('Account opening, closing, or management',)`, `('Billing disputes',)` | Value Statics: Total count 23419 - Distinct count 38 - Null count 0 | Column Description: problems leading to this complaints \n\t\"Sub-issue\" TEXT, -- | Column Description: sub problems leading to this complaints if exists | Value Description: more detailed issue\n\t\"Consumer complaint narrative\" TEXT, -- | Column Description: Consumer complaint narrative \n\tTags TEXT, -- Example Values: `Older American`, `Older American, Servicemember`, `Servicemember` | Value Statics: Total count 3276 - Distinct count 3 - Null count 20143 | Column Description: tags of client \n\t\"Consumer consent provided?\" TEXT, -- Example Values: `N/A`, `Consent not provided`, `Consent provided`, `Other` | Value Statics: Total count 23323 - Distinct count 4 - Null count 96 | Column Name Meaning: Tags Consumer consent provided? | Column Description: whether the tags labeled under permission of the clients | Value Description: null, 'N/A' or empty value: indicating that the company didn't get the permission of consent. if the value is not empty: customers provide the consent for this tag.\n\t\"Submitted via\" TEXT, -- Example Values: `Email`, `Fax`, `Postal mail`, `Referral`, `Web` | Value Statics: Total count 23419 - Distinct count 6 - Null count 0 | Column Description: Submitted via \n\t\"Date sent to company\" TEXT, -- Example Values: `('2014-07-09',)`, `('2012-04-13',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1778 - Null count 0 | Column Description: Date sent to company | Value Description: delay of the complaints = 'Date sent to company'\n\t\"Company response to consumer\" TEXT, -- Example Values: `Closed with explanation`, `Closed with relief`, `Closed without relief`, `Closed with non-monetary relief`, `In progress` | Value Statics: Total count 23419 - Distinct count 8 - Null count 0 | Column Description: Company response to consumer \n\t\"Timely response?\" TEXT, -- Example Values: `Yes`, `No` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: whether the response of the company is timely \n\t\"Consumer disputed?\" TEXT, -- Example Values: `No`, `Yes` | Value Statics: Total count 22417 - Distinct count 2 - Null count 1002 | Column Description: whether the consumer dispute about the response from the company. \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000140',)` | Value Statics: Total count 23419 - Distinct count 23419 - Null count 0 | Column Description: id number indicating which complaint \n\tClient_ID TEXT, -- Example Values: `('C00003714',)`, `('C00001366',)`, `('C00002330',)` | Value Statics: Total count 23419 - Distinct count 5284 - Null count 0 | Column Name Meaning: Client ID | Column Description: id number indicating which client \n\tprimary key (\"Complaint ID\", Client_ID),\n\tforeign key (\"Complaint ID\") references callcenterlogs(\"Complaint ID\"),\n\tforeign key (Client_ID) references client(client_id),\n);\n\nCREATE TABLE reviews\n(\n\t\"Date\" DATE primary key,\n\tStars INTEGER, -- Example Values: `5`, `1`, `2` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tReviews TEXT, -- \n\tProduct TEXT, -- Example Values: `Eagle National Mortgage`, `Eagle National Bank`, `Eagle Capital` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tdistrict_id INTEGER, -- Example Values: `(65,)`, `(66,)`, `(23,)` | Value Statics: Total count 377 - Distinct count 77 - Null count 0 \n\tforeign key (district_id) references district(district_id),\n);",
"question": "What is the medium through which most complaints are registered in Florida?",
"evidence": "medium refers to \"Submitted via\"; most complaints refers to MAX(Complaint ID); Florida refers to state = 'florida';"
}
|
{
"db_mode": "train",
"db_id": "retail_complains",
"gt_sql": "SELECT T3.`Submitted via` FROM callcenterlogs AS T1 INNER JOIN client AS T2 ON T1.`rand client` = T2.client_id INNER JOIN events AS T3 ON T1.`Complaint ID` = T3.`Complaint ID` WHERE T2.state = 'FL' GROUP BY T1.`Complaint ID` ORDER BY COUNT(T1.`Complaint ID`) DESC LIMIT 1"
}
|
retail_complains
|
324
|
{
"db_schema": "CREATE TABLE state\n(\n\tStateCode TEXT constraint state_pk primary key,\n\tState TEXT, -- Example Values: `('Alabama',)`, `('Arkansas',)`, `('Arizona',)` | Value Statics: Total count 48 - Distinct count 48 - Null count 0 \n\tRegion TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0 \n);\n\nCREATE TABLE callcenterlogs\n(\n\t\"Date received\" DATE, -- Example Values: `('2017-03-27',)`, `('2017-03-23',)`, `('2017-03-22',)` | Value Statics: Total count 3999 - Distinct count 1842 - Null count 0 | Column Description: complaint date \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000175',)` | Value Statics: Total count 2504 - Distinct count 2504 - Null count 1495 | Column Description: unique id number representing each complaint \n\t\"rand client\" TEXT, -- Example Values: `('C00004587',)`, `('C00003328',)`, `('C00001685',)` | Value Statics: Total count 2504 - Distinct count 2019 - Null count 1495 | Column Description: client id \n\tphonefinal TEXT, -- Example Values: `('977-806-9726',)`, `('322-598-7152',)`, `('508-311-5237',)` | Value Statics: Total count 3999 - Distinct count 2744 - Null count 0 | Column Name Meaning: phone final | Column Description: final phone number \n\t\"vru+line\" TEXT, -- Example Values: `('AA0103',)`, `('AA0205',)`, `('AA0110',)` | Value Statics: Total count 3015 - Distinct count 27 - Null count 984 | Column Name Meaning: voice response unit line | Column Description: voice response unit line \n\tcall_id INTEGER, -- Example Values: `(34536,)`, `(34537,)`, `(34538,)` | Value Statics: Total count 3015 - Distinct count 3015 - Null count 984 | Column Name Meaning: call id | Column Description: id number identifying the call \n\tpriority INTEGER, -- Example Values: `0`, `2`, `1` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: priority of the complaint | Value Description: 0, 1, 2, null: not available, higher: -> higher priority, -> more serious/urgent complaint\n\ttype TEXT, -- Example Values: `NW`, `PS`, `NE`, `TT`, `IN` | Value Statics: Total count 3015 - Distinct count 6 - Null count 984 | Column Description: type of complaint \n\toutcome TEXT, -- Example Values: `AGENT`, `HANG`, `PHANTOM` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: the outcome of processing of complaints \n\tserver TEXT, -- Example Values: `('MICHAL',)`, `('TOVA',)`, `('YIFAT',)` | Value Statics: Total count 3015 - Distinct count 25 - Null count 984 | Column Description: server \n\tser_start TEXT, -- Example Values: `('13:34:11',)`, `('10:58:22',)`, `('13:00:54',)` | Value Statics: Total count 3999 - Distinct count 3733 - Null count 0 | Column Name Meaning: server start | Column Description: server start time | Value Description: HH:MM:SS\n\tser_exit TEXT, -- Example Values: `('13:40:23',)`, `('11:16:10',)`, `('13:13:31',)` | Value Statics: Total count 3999 - Distinct count 3738 - Null count 0 | Column Name Meaning: server exit | Column Description: server exit time \n\tser_time TEXT, -- Example Values: `('00:06:12',)`, `('00:17:48',)`, `('00:12:37',)` | Value Statics: Total count 3999 - Distinct count 1303 - Null count 0 | Column Name Meaning: server time | Column Description: server time | Value Description: longer server time referring to more verbose/longer complaint\n\tprimary key (\"Complaint ID\"),\n\tforeign key (\"rand client\") references client(client_id),\n);\n\nCREATE TABLE client\n(\n\tclient_id TEXT primary key,\n\tsex TEXT, -- Example Values: `Female`, `Male` | Value Statics: Total count 5369 - Distinct count 2 - Null count 0 | Column Description: sex of client \n\tday INTEGER, -- Example Values: `(13,)`, `(4,)`, `(9,)` | Value Statics: Total count 5369 - Distinct count 31 - Null count 0 | Column Description: day of the birthday \n\tmonth INTEGER, -- Example Values: `12`, `2`, `10`, `7`, `9` | Value Statics: Total count 5369 - Distinct count 12 - Null count 0 | Column Description: month of the birthday \n\tyear INTEGER, -- Example Values: `(1990,)`, `(1965,)`, `(1960,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: year when is born \n\tage INTEGER, -- Example Values: `(29,)`, `(54,)`, `(59,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: age | Value Description: teenager: 13-19 adult: 19-65 elder: > 65\n\tsocial TEXT, -- Example Values: `('926-93-2157',)`, `('806-94-5725',)`, `('614-70-9100',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: social number | Value Description: ssn: us id number for each person\n\tfirst TEXT, -- Example Values: `('Emma',)`, `('Noah',)`, `('Olivia',)` | Value Statics: Total count 5369 - Distinct count 2885 - Null count 0 | Column Description: first name \n\tmiddle TEXT, -- Example Values: `('Avaya',)`, `('Everest',)`, `('Brooklynne',)` | Value Statics: Total count 5369 - Distinct count 3925 - Null count 0 | Column Description: middle name \n\tlast TEXT, -- Example Values: `('Smith',)`, `('Thompson',)`, `('Johnson',)` | Value Statics: Total count 5369 - Distinct count 1769 - Null count 0 | Column Description: last name \n\tphone TEXT, -- Example Values: `('367-171-6840',)`, `('212-423-7734',)`, `('212-425-6932',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: phone number \n\temail TEXT, -- Example Values: `('emma.smith@gmail.com',)`, `('noah.thompson@gmail.com',)`, `('olivia.johnson@outlook.com',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: email | Value Description: google email / account: @gamil.com microsoft email / account: xxx@outlook.com\n\taddress_1 TEXT, -- Example Values: `('387 Wellington Ave.',)`, `('75 W. Berkshire St.',)`, `('36 Second St.',)` | Value Statics: Total count 5369 - Distinct count 5365 - Null count 0 | Column Description: address 1 \n\taddress_2 TEXT, -- Example Values: `('Unit 1',)`, `('Unit 6',)`, `('Unit 80',)` | Value Statics: Total count 83 - Distinct count 24 - Null count 5286 | Column Description: address 2 | Value Description: entire address = (address_1, address_2)\n\tcity TEXT, -- Example Values: `('Albuquerque',)`, `('New York City',)`, `('Indianapolis',)` | Value Statics: Total count 5369 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `('NM',)`, `('NY',)`, `('IN',)` | Value Statics: Total count 5369 - Distinct count 51 - Null count 0 | Column Description: state code \n\tzipcode INTEGER, -- Example Values: `(47246,)`, `(10040,)`, `(10162,)` | Value Statics: Total count 5369 - Distinct count 3512 - Null count 0 | Column Description: zipcode \n\tdistrict_id INTEGER, -- Example Values: `(18,)`, `(1,)`, `(5,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Name Meaning: district id | Column Description: district id number \n\tforeign key (district_id) references district(district_id),\n);\n\nCREATE TABLE district\n(\n\tdistrict_id INTEGER primary key,\n\tcity TEXT, -- Example Values: `('New York City',)`, `('Jacksonville',)`, `('Columbus',)` | Value Statics: Total count 77 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate_abbrev TEXT, -- Example Values: `('NY',)`, `('FL',)`, `('OH',)` | Value Statics: Total count 77 - Distinct count 51 - Null count 0 | Column Description: state abbreviated code \n\tdivision TEXT, -- Example Values: `Middle Atlantic`, `South Atlantic`, `East North Central`, `Pacific`, `Mountain` | Value Statics: Total count 77 - Distinct count 9 - Null count 0 | Column Description: division \n\tforeign key (state_abbrev) references state(StateCode),\n);\n\nCREATE TABLE events\n(\n\t\"Date received\" DATE, -- Example Values: `('2014-07-03',)`, `('2012-04-12',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1908 - Null count 0 | Column Description: Date received \n\tProduct TEXT, -- Example Values: `Bank account or service`, `Credit card` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: complaining about which product \n\t\"Sub-product\" TEXT, -- Example Values: `Checking account`, `Savings account`, `Other bank product/service`, `(CD) Certificate of deposit`, `Cashing a check without an account` | Value Statics: Total count 14091 - Distinct count 5 - Null count 9328 | Column Description: sub product if exists | Value Description: detailed product\n\tIssue TEXT, -- Example Values: `('Deposits and withdrawals',)`, `('Account opening, closing, or management',)`, `('Billing disputes',)` | Value Statics: Total count 23419 - Distinct count 38 - Null count 0 | Column Description: problems leading to this complaints \n\t\"Sub-issue\" TEXT, -- | Column Description: sub problems leading to this complaints if exists | Value Description: more detailed issue\n\t\"Consumer complaint narrative\" TEXT, -- | Column Description: Consumer complaint narrative \n\tTags TEXT, -- Example Values: `Older American`, `Older American, Servicemember`, `Servicemember` | Value Statics: Total count 3276 - Distinct count 3 - Null count 20143 | Column Description: tags of client \n\t\"Consumer consent provided?\" TEXT, -- Example Values: `N/A`, `Consent not provided`, `Consent provided`, `Other` | Value Statics: Total count 23323 - Distinct count 4 - Null count 96 | Column Name Meaning: Tags Consumer consent provided? | Column Description: whether the tags labeled under permission of the clients | Value Description: null, 'N/A' or empty value: indicating that the company didn't get the permission of consent. if the value is not empty: customers provide the consent for this tag.\n\t\"Submitted via\" TEXT, -- Example Values: `Email`, `Fax`, `Postal mail`, `Referral`, `Web` | Value Statics: Total count 23419 - Distinct count 6 - Null count 0 | Column Description: Submitted via \n\t\"Date sent to company\" TEXT, -- Example Values: `('2014-07-09',)`, `('2012-04-13',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1778 - Null count 0 | Column Description: Date sent to company | Value Description: delay of the complaints = 'Date sent to company'\n\t\"Company response to consumer\" TEXT, -- Example Values: `Closed with explanation`, `Closed with relief`, `Closed without relief`, `Closed with non-monetary relief`, `In progress` | Value Statics: Total count 23419 - Distinct count 8 - Null count 0 | Column Description: Company response to consumer \n\t\"Timely response?\" TEXT, -- Example Values: `Yes`, `No` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: whether the response of the company is timely \n\t\"Consumer disputed?\" TEXT, -- Example Values: `No`, `Yes` | Value Statics: Total count 22417 - Distinct count 2 - Null count 1002 | Column Description: whether the consumer dispute about the response from the company. \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000140',)` | Value Statics: Total count 23419 - Distinct count 23419 - Null count 0 | Column Description: id number indicating which complaint \n\tClient_ID TEXT, -- Example Values: `('C00003714',)`, `('C00001366',)`, `('C00002330',)` | Value Statics: Total count 23419 - Distinct count 5284 - Null count 0 | Column Name Meaning: Client ID | Column Description: id number indicating which client \n\tprimary key (\"Complaint ID\", Client_ID),\n\tforeign key (\"Complaint ID\") references callcenterlogs(\"Complaint ID\"),\n\tforeign key (Client_ID) references client(client_id),\n);\n\nCREATE TABLE reviews\n(\n\t\"Date\" DATE primary key,\n\tStars INTEGER, -- Example Values: `5`, `1`, `2` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tReviews TEXT, -- \n\tProduct TEXT, -- Example Values: `Eagle National Mortgage`, `Eagle National Bank`, `Eagle Capital` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tdistrict_id INTEGER, -- Example Values: `(65,)`, `(66,)`, `(23,)` | Value Statics: Total count 377 - Distinct count 77 - Null count 0 \n\tforeign key (district_id) references district(district_id),\n);",
"question": "What is the percentage of male clients complaining about their credit cards?",
"evidence": "percentage = MULTIPLY(DIVIDE(SUM(sex = 'Male'), COUNT(client_id)), 1.0); male refers to sex = 'Male'; credit cards refers to Product = 'Credit card';"
}
|
{
"db_mode": "train",
"db_id": "retail_complains",
"gt_sql": "SELECT CAST(SUM(CASE WHEN T1.sex = 'Male' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Product = 'Credit card'"
}
|
retail_complains
|
399
|
{
"db_schema": "CREATE TABLE state\n(\n\tStateCode TEXT constraint state_pk primary key,\n\tState TEXT, -- Example Values: `('Alabama',)`, `('Arkansas',)`, `('Arizona',)` | Value Statics: Total count 48 - Distinct count 48 - Null count 0 \n\tRegion TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0 \n);\n\nCREATE TABLE callcenterlogs\n(\n\t\"Date received\" DATE, -- Example Values: `('2017-03-27',)`, `('2017-03-23',)`, `('2017-03-22',)` | Value Statics: Total count 3999 - Distinct count 1842 - Null count 0 | Column Description: complaint date \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000175',)` | Value Statics: Total count 2504 - Distinct count 2504 - Null count 1495 | Column Description: unique id number representing each complaint \n\t\"rand client\" TEXT, -- Example Values: `('C00004587',)`, `('C00003328',)`, `('C00001685',)` | Value Statics: Total count 2504 - Distinct count 2019 - Null count 1495 | Column Description: client id \n\tphonefinal TEXT, -- Example Values: `('977-806-9726',)`, `('322-598-7152',)`, `('508-311-5237',)` | Value Statics: Total count 3999 - Distinct count 2744 - Null count 0 | Column Name Meaning: phone final | Column Description: final phone number \n\t\"vru+line\" TEXT, -- Example Values: `('AA0103',)`, `('AA0205',)`, `('AA0110',)` | Value Statics: Total count 3015 - Distinct count 27 - Null count 984 | Column Name Meaning: voice response unit line | Column Description: voice response unit line \n\tcall_id INTEGER, -- Example Values: `(34536,)`, `(34537,)`, `(34538,)` | Value Statics: Total count 3015 - Distinct count 3015 - Null count 984 | Column Name Meaning: call id | Column Description: id number identifying the call \n\tpriority INTEGER, -- Example Values: `0`, `2`, `1` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: priority of the complaint | Value Description: 0, 1, 2, null: not available, higher: -> higher priority, -> more serious/urgent complaint\n\ttype TEXT, -- Example Values: `NW`, `PS`, `NE`, `TT`, `IN` | Value Statics: Total count 3015 - Distinct count 6 - Null count 984 | Column Description: type of complaint \n\toutcome TEXT, -- Example Values: `AGENT`, `HANG`, `PHANTOM` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: the outcome of processing of complaints \n\tserver TEXT, -- Example Values: `('MICHAL',)`, `('TOVA',)`, `('YIFAT',)` | Value Statics: Total count 3015 - Distinct count 25 - Null count 984 | Column Description: server \n\tser_start TEXT, -- Example Values: `('13:34:11',)`, `('10:58:22',)`, `('13:00:54',)` | Value Statics: Total count 3999 - Distinct count 3733 - Null count 0 | Column Name Meaning: server start | Column Description: server start time | Value Description: HH:MM:SS\n\tser_exit TEXT, -- Example Values: `('13:40:23',)`, `('11:16:10',)`, `('13:13:31',)` | Value Statics: Total count 3999 - Distinct count 3738 - Null count 0 | Column Name Meaning: server exit | Column Description: server exit time \n\tser_time TEXT, -- Example Values: `('00:06:12',)`, `('00:17:48',)`, `('00:12:37',)` | Value Statics: Total count 3999 - Distinct count 1303 - Null count 0 | Column Name Meaning: server time | Column Description: server time | Value Description: longer server time referring to more verbose/longer complaint\n\tprimary key (\"Complaint ID\"),\n\tforeign key (\"rand client\") references client(client_id),\n);\n\nCREATE TABLE client\n(\n\tclient_id TEXT primary key,\n\tsex TEXT, -- Example Values: `Female`, `Male` | Value Statics: Total count 5369 - Distinct count 2 - Null count 0 | Column Description: sex of client \n\tday INTEGER, -- Example Values: `(13,)`, `(4,)`, `(9,)` | Value Statics: Total count 5369 - Distinct count 31 - Null count 0 | Column Description: day of the birthday \n\tmonth INTEGER, -- Example Values: `12`, `2`, `10`, `7`, `9` | Value Statics: Total count 5369 - Distinct count 12 - Null count 0 | Column Description: month of the birthday \n\tyear INTEGER, -- Example Values: `(1990,)`, `(1965,)`, `(1960,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: year when is born \n\tage INTEGER, -- Example Values: `(29,)`, `(54,)`, `(59,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: age | Value Description: teenager: 13-19 adult: 19-65 elder: > 65\n\tsocial TEXT, -- Example Values: `('926-93-2157',)`, `('806-94-5725',)`, `('614-70-9100',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: social number | Value Description: ssn: us id number for each person\n\tfirst TEXT, -- Example Values: `('Emma',)`, `('Noah',)`, `('Olivia',)` | Value Statics: Total count 5369 - Distinct count 2885 - Null count 0 | Column Description: first name \n\tmiddle TEXT, -- Example Values: `('Avaya',)`, `('Everest',)`, `('Brooklynne',)` | Value Statics: Total count 5369 - Distinct count 3925 - Null count 0 | Column Description: middle name \n\tlast TEXT, -- Example Values: `('Smith',)`, `('Thompson',)`, `('Johnson',)` | Value Statics: Total count 5369 - Distinct count 1769 - Null count 0 | Column Description: last name \n\tphone TEXT, -- Example Values: `('367-171-6840',)`, `('212-423-7734',)`, `('212-425-6932',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: phone number \n\temail TEXT, -- Example Values: `('emma.smith@gmail.com',)`, `('noah.thompson@gmail.com',)`, `('olivia.johnson@outlook.com',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: email | Value Description: google email / account: @gamil.com microsoft email / account: xxx@outlook.com\n\taddress_1 TEXT, -- Example Values: `('387 Wellington Ave.',)`, `('75 W. Berkshire St.',)`, `('36 Second St.',)` | Value Statics: Total count 5369 - Distinct count 5365 - Null count 0 | Column Description: address 1 \n\taddress_2 TEXT, -- Example Values: `('Unit 1',)`, `('Unit 6',)`, `('Unit 80',)` | Value Statics: Total count 83 - Distinct count 24 - Null count 5286 | Column Description: address 2 | Value Description: entire address = (address_1, address_2)\n\tcity TEXT, -- Example Values: `('Albuquerque',)`, `('New York City',)`, `('Indianapolis',)` | Value Statics: Total count 5369 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `('NM',)`, `('NY',)`, `('IN',)` | Value Statics: Total count 5369 - Distinct count 51 - Null count 0 | Column Description: state code \n\tzipcode INTEGER, -- Example Values: `(47246,)`, `(10040,)`, `(10162,)` | Value Statics: Total count 5369 - Distinct count 3512 - Null count 0 | Column Description: zipcode \n\tdistrict_id INTEGER, -- Example Values: `(18,)`, `(1,)`, `(5,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Name Meaning: district id | Column Description: district id number \n\tforeign key (district_id) references district(district_id),\n);\n\nCREATE TABLE district\n(\n\tdistrict_id INTEGER primary key,\n\tcity TEXT, -- Example Values: `('New York City',)`, `('Jacksonville',)`, `('Columbus',)` | Value Statics: Total count 77 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate_abbrev TEXT, -- Example Values: `('NY',)`, `('FL',)`, `('OH',)` | Value Statics: Total count 77 - Distinct count 51 - Null count 0 | Column Description: state abbreviated code \n\tdivision TEXT, -- Example Values: `Middle Atlantic`, `South Atlantic`, `East North Central`, `Pacific`, `Mountain` | Value Statics: Total count 77 - Distinct count 9 - Null count 0 | Column Description: division \n\tforeign key (state_abbrev) references state(StateCode),\n);\n\nCREATE TABLE events\n(\n\t\"Date received\" DATE, -- Example Values: `('2014-07-03',)`, `('2012-04-12',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1908 - Null count 0 | Column Description: Date received \n\tProduct TEXT, -- Example Values: `Bank account or service`, `Credit card` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: complaining about which product \n\t\"Sub-product\" TEXT, -- Example Values: `Checking account`, `Savings account`, `Other bank product/service`, `(CD) Certificate of deposit`, `Cashing a check without an account` | Value Statics: Total count 14091 - Distinct count 5 - Null count 9328 | Column Description: sub product if exists | Value Description: detailed product\n\tIssue TEXT, -- Example Values: `('Deposits and withdrawals',)`, `('Account opening, closing, or management',)`, `('Billing disputes',)` | Value Statics: Total count 23419 - Distinct count 38 - Null count 0 | Column Description: problems leading to this complaints \n\t\"Sub-issue\" TEXT, -- | Column Description: sub problems leading to this complaints if exists | Value Description: more detailed issue\n\t\"Consumer complaint narrative\" TEXT, -- | Column Description: Consumer complaint narrative \n\tTags TEXT, -- Example Values: `Older American`, `Older American, Servicemember`, `Servicemember` | Value Statics: Total count 3276 - Distinct count 3 - Null count 20143 | Column Description: tags of client \n\t\"Consumer consent provided?\" TEXT, -- Example Values: `N/A`, `Consent not provided`, `Consent provided`, `Other` | Value Statics: Total count 23323 - Distinct count 4 - Null count 96 | Column Name Meaning: Tags Consumer consent provided? | Column Description: whether the tags labeled under permission of the clients | Value Description: null, 'N/A' or empty value: indicating that the company didn't get the permission of consent. if the value is not empty: customers provide the consent for this tag.\n\t\"Submitted via\" TEXT, -- Example Values: `Email`, `Fax`, `Postal mail`, `Referral`, `Web` | Value Statics: Total count 23419 - Distinct count 6 - Null count 0 | Column Description: Submitted via \n\t\"Date sent to company\" TEXT, -- Example Values: `('2014-07-09',)`, `('2012-04-13',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1778 - Null count 0 | Column Description: Date sent to company | Value Description: delay of the complaints = 'Date sent to company'\n\t\"Company response to consumer\" TEXT, -- Example Values: `Closed with explanation`, `Closed with relief`, `Closed without relief`, `Closed with non-monetary relief`, `In progress` | Value Statics: Total count 23419 - Distinct count 8 - Null count 0 | Column Description: Company response to consumer \n\t\"Timely response?\" TEXT, -- Example Values: `Yes`, `No` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: whether the response of the company is timely \n\t\"Consumer disputed?\" TEXT, -- Example Values: `No`, `Yes` | Value Statics: Total count 22417 - Distinct count 2 - Null count 1002 | Column Description: whether the consumer dispute about the response from the company. \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000140',)` | Value Statics: Total count 23419 - Distinct count 23419 - Null count 0 | Column Description: id number indicating which complaint \n\tClient_ID TEXT, -- Example Values: `('C00003714',)`, `('C00001366',)`, `('C00002330',)` | Value Statics: Total count 23419 - Distinct count 5284 - Null count 0 | Column Name Meaning: Client ID | Column Description: id number indicating which client \n\tprimary key (\"Complaint ID\", Client_ID),\n\tforeign key (\"Complaint ID\") references callcenterlogs(\"Complaint ID\"),\n\tforeign key (Client_ID) references client(client_id),\n);\n\nCREATE TABLE reviews\n(\n\t\"Date\" DATE primary key,\n\tStars INTEGER, -- Example Values: `5`, `1`, `2` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tReviews TEXT, -- \n\tProduct TEXT, -- Example Values: `Eagle National Mortgage`, `Eagle National Bank`, `Eagle Capital` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tdistrict_id INTEGER, -- Example Values: `(65,)`, `(66,)`, `(23,)` | Value Statics: Total count 377 - Distinct count 77 - Null count 0 \n\tforeign key (district_id) references district(district_id),\n);",
"question": "In reviews for the Eagle National Bank product, how many of the 5 star reviews where from Nashville, Tennessee?",
"evidence": "5 star refers to Stars = 5; Nashville refers to city = 'Nashville'; Tennessee refers to state_abbrev = 'TN'"
}
|
{
"db_mode": "train",
"db_id": "retail_complains",
"gt_sql": "SELECT COUNT(T2.Stars) FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T1.city = 'Nashville' AND T1.state_abbrev = 'TN' AND T2.Product = 'Eagle National Mortgage' AND T2.Stars = 5"
}
|
retail_complains
|
271
|
{
"db_schema": "CREATE TABLE state\n(\n\tStateCode TEXT constraint state_pk primary key,\n\tState TEXT, -- Example Values: `('Alabama',)`, `('Arkansas',)`, `('Arizona',)` | Value Statics: Total count 48 - Distinct count 48 - Null count 0 \n\tRegion TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0 \n);\n\nCREATE TABLE callcenterlogs\n(\n\t\"Date received\" DATE, -- Example Values: `('2017-03-27',)`, `('2017-03-23',)`, `('2017-03-22',)` | Value Statics: Total count 3999 - Distinct count 1842 - Null count 0 | Column Description: complaint date \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000175',)` | Value Statics: Total count 2504 - Distinct count 2504 - Null count 1495 | Column Description: unique id number representing each complaint \n\t\"rand client\" TEXT, -- Example Values: `('C00004587',)`, `('C00003328',)`, `('C00001685',)` | Value Statics: Total count 2504 - Distinct count 2019 - Null count 1495 | Column Description: client id \n\tphonefinal TEXT, -- Example Values: `('977-806-9726',)`, `('322-598-7152',)`, `('508-311-5237',)` | Value Statics: Total count 3999 - Distinct count 2744 - Null count 0 | Column Name Meaning: phone final | Column Description: final phone number \n\t\"vru+line\" TEXT, -- Example Values: `('AA0103',)`, `('AA0205',)`, `('AA0110',)` | Value Statics: Total count 3015 - Distinct count 27 - Null count 984 | Column Name Meaning: voice response unit line | Column Description: voice response unit line \n\tcall_id INTEGER, -- Example Values: `(34536,)`, `(34537,)`, `(34538,)` | Value Statics: Total count 3015 - Distinct count 3015 - Null count 984 | Column Name Meaning: call id | Column Description: id number identifying the call \n\tpriority INTEGER, -- Example Values: `0`, `2`, `1` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: priority of the complaint | Value Description: 0, 1, 2, null: not available, higher: -> higher priority, -> more serious/urgent complaint\n\ttype TEXT, -- Example Values: `NW`, `PS`, `NE`, `TT`, `IN` | Value Statics: Total count 3015 - Distinct count 6 - Null count 984 | Column Description: type of complaint \n\toutcome TEXT, -- Example Values: `AGENT`, `HANG`, `PHANTOM` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: the outcome of processing of complaints \n\tserver TEXT, -- Example Values: `('MICHAL',)`, `('TOVA',)`, `('YIFAT',)` | Value Statics: Total count 3015 - Distinct count 25 - Null count 984 | Column Description: server \n\tser_start TEXT, -- Example Values: `('13:34:11',)`, `('10:58:22',)`, `('13:00:54',)` | Value Statics: Total count 3999 - Distinct count 3733 - Null count 0 | Column Name Meaning: server start | Column Description: server start time | Value Description: HH:MM:SS\n\tser_exit TEXT, -- Example Values: `('13:40:23',)`, `('11:16:10',)`, `('13:13:31',)` | Value Statics: Total count 3999 - Distinct count 3738 - Null count 0 | Column Name Meaning: server exit | Column Description: server exit time \n\tser_time TEXT, -- Example Values: `('00:06:12',)`, `('00:17:48',)`, `('00:12:37',)` | Value Statics: Total count 3999 - Distinct count 1303 - Null count 0 | Column Name Meaning: server time | Column Description: server time | Value Description: longer server time referring to more verbose/longer complaint\n\tprimary key (\"Complaint ID\"),\n\tforeign key (\"rand client\") references client(client_id),\n);\n\nCREATE TABLE client\n(\n\tclient_id TEXT primary key,\n\tsex TEXT, -- Example Values: `Female`, `Male` | Value Statics: Total count 5369 - Distinct count 2 - Null count 0 | Column Description: sex of client \n\tday INTEGER, -- Example Values: `(13,)`, `(4,)`, `(9,)` | Value Statics: Total count 5369 - Distinct count 31 - Null count 0 | Column Description: day of the birthday \n\tmonth INTEGER, -- Example Values: `12`, `2`, `10`, `7`, `9` | Value Statics: Total count 5369 - Distinct count 12 - Null count 0 | Column Description: month of the birthday \n\tyear INTEGER, -- Example Values: `(1990,)`, `(1965,)`, `(1960,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: year when is born \n\tage INTEGER, -- Example Values: `(29,)`, `(54,)`, `(59,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: age | Value Description: teenager: 13-19 adult: 19-65 elder: > 65\n\tsocial TEXT, -- Example Values: `('926-93-2157',)`, `('806-94-5725',)`, `('614-70-9100',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: social number | Value Description: ssn: us id number for each person\n\tfirst TEXT, -- Example Values: `('Emma',)`, `('Noah',)`, `('Olivia',)` | Value Statics: Total count 5369 - Distinct count 2885 - Null count 0 | Column Description: first name \n\tmiddle TEXT, -- Example Values: `('Avaya',)`, `('Everest',)`, `('Brooklynne',)` | Value Statics: Total count 5369 - Distinct count 3925 - Null count 0 | Column Description: middle name \n\tlast TEXT, -- Example Values: `('Smith',)`, `('Thompson',)`, `('Johnson',)` | Value Statics: Total count 5369 - Distinct count 1769 - Null count 0 | Column Description: last name \n\tphone TEXT, -- Example Values: `('367-171-6840',)`, `('212-423-7734',)`, `('212-425-6932',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: phone number \n\temail TEXT, -- Example Values: `('emma.smith@gmail.com',)`, `('noah.thompson@gmail.com',)`, `('olivia.johnson@outlook.com',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: email | Value Description: google email / account: @gamil.com microsoft email / account: xxx@outlook.com\n\taddress_1 TEXT, -- Example Values: `('387 Wellington Ave.',)`, `('75 W. Berkshire St.',)`, `('36 Second St.',)` | Value Statics: Total count 5369 - Distinct count 5365 - Null count 0 | Column Description: address 1 \n\taddress_2 TEXT, -- Example Values: `('Unit 1',)`, `('Unit 6',)`, `('Unit 80',)` | Value Statics: Total count 83 - Distinct count 24 - Null count 5286 | Column Description: address 2 | Value Description: entire address = (address_1, address_2)\n\tcity TEXT, -- Example Values: `('Albuquerque',)`, `('New York City',)`, `('Indianapolis',)` | Value Statics: Total count 5369 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `('NM',)`, `('NY',)`, `('IN',)` | Value Statics: Total count 5369 - Distinct count 51 - Null count 0 | Column Description: state code \n\tzipcode INTEGER, -- Example Values: `(47246,)`, `(10040,)`, `(10162,)` | Value Statics: Total count 5369 - Distinct count 3512 - Null count 0 | Column Description: zipcode \n\tdistrict_id INTEGER, -- Example Values: `(18,)`, `(1,)`, `(5,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Name Meaning: district id | Column Description: district id number \n\tforeign key (district_id) references district(district_id),\n);\n\nCREATE TABLE district\n(\n\tdistrict_id INTEGER primary key,\n\tcity TEXT, -- Example Values: `('New York City',)`, `('Jacksonville',)`, `('Columbus',)` | Value Statics: Total count 77 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate_abbrev TEXT, -- Example Values: `('NY',)`, `('FL',)`, `('OH',)` | Value Statics: Total count 77 - Distinct count 51 - Null count 0 | Column Description: state abbreviated code \n\tdivision TEXT, -- Example Values: `Middle Atlantic`, `South Atlantic`, `East North Central`, `Pacific`, `Mountain` | Value Statics: Total count 77 - Distinct count 9 - Null count 0 | Column Description: division \n\tforeign key (state_abbrev) references state(StateCode),\n);\n\nCREATE TABLE events\n(\n\t\"Date received\" DATE, -- Example Values: `('2014-07-03',)`, `('2012-04-12',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1908 - Null count 0 | Column Description: Date received \n\tProduct TEXT, -- Example Values: `Bank account or service`, `Credit card` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: complaining about which product \n\t\"Sub-product\" TEXT, -- Example Values: `Checking account`, `Savings account`, `Other bank product/service`, `(CD) Certificate of deposit`, `Cashing a check without an account` | Value Statics: Total count 14091 - Distinct count 5 - Null count 9328 | Column Description: sub product if exists | Value Description: detailed product\n\tIssue TEXT, -- Example Values: `('Deposits and withdrawals',)`, `('Account opening, closing, or management',)`, `('Billing disputes',)` | Value Statics: Total count 23419 - Distinct count 38 - Null count 0 | Column Description: problems leading to this complaints \n\t\"Sub-issue\" TEXT, -- | Column Description: sub problems leading to this complaints if exists | Value Description: more detailed issue\n\t\"Consumer complaint narrative\" TEXT, -- | Column Description: Consumer complaint narrative \n\tTags TEXT, -- Example Values: `Older American`, `Older American, Servicemember`, `Servicemember` | Value Statics: Total count 3276 - Distinct count 3 - Null count 20143 | Column Description: tags of client \n\t\"Consumer consent provided?\" TEXT, -- Example Values: `N/A`, `Consent not provided`, `Consent provided`, `Other` | Value Statics: Total count 23323 - Distinct count 4 - Null count 96 | Column Name Meaning: Tags Consumer consent provided? | Column Description: whether the tags labeled under permission of the clients | Value Description: null, 'N/A' or empty value: indicating that the company didn't get the permission of consent. if the value is not empty: customers provide the consent for this tag.\n\t\"Submitted via\" TEXT, -- Example Values: `Email`, `Fax`, `Postal mail`, `Referral`, `Web` | Value Statics: Total count 23419 - Distinct count 6 - Null count 0 | Column Description: Submitted via \n\t\"Date sent to company\" TEXT, -- Example Values: `('2014-07-09',)`, `('2012-04-13',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1778 - Null count 0 | Column Description: Date sent to company | Value Description: delay of the complaints = 'Date sent to company'\n\t\"Company response to consumer\" TEXT, -- Example Values: `Closed with explanation`, `Closed with relief`, `Closed without relief`, `Closed with non-monetary relief`, `In progress` | Value Statics: Total count 23419 - Distinct count 8 - Null count 0 | Column Description: Company response to consumer \n\t\"Timely response?\" TEXT, -- Example Values: `Yes`, `No` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: whether the response of the company is timely \n\t\"Consumer disputed?\" TEXT, -- Example Values: `No`, `Yes` | Value Statics: Total count 22417 - Distinct count 2 - Null count 1002 | Column Description: whether the consumer dispute about the response from the company. \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000140',)` | Value Statics: Total count 23419 - Distinct count 23419 - Null count 0 | Column Description: id number indicating which complaint \n\tClient_ID TEXT, -- Example Values: `('C00003714',)`, `('C00001366',)`, `('C00002330',)` | Value Statics: Total count 23419 - Distinct count 5284 - Null count 0 | Column Name Meaning: Client ID | Column Description: id number indicating which client \n\tprimary key (\"Complaint ID\", Client_ID),\n\tforeign key (\"Complaint ID\") references callcenterlogs(\"Complaint ID\"),\n\tforeign key (Client_ID) references client(client_id),\n);\n\nCREATE TABLE reviews\n(\n\t\"Date\" DATE primary key,\n\tStars INTEGER, -- Example Values: `5`, `1`, `2` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tReviews TEXT, -- \n\tProduct TEXT, -- Example Values: `Eagle National Mortgage`, `Eagle National Bank`, `Eagle Capital` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tdistrict_id INTEGER, -- Example Values: `(65,)`, `(66,)`, `(23,)` | Value Statics: Total count 377 - Distinct count 77 - Null count 0 \n\tforeign key (district_id) references district(district_id),\n);",
"question": "What is the percentage of the complaint calls from Mr Mason Javen Lopez has got the consent provided by the customer?",
"evidence": "percentage = MULTIPLY(DIVIDE(SUM(\"Consumer consent provided?\" = 'Consent provided'), COUNT(client_id)), 1.0); Mr refers to sex = 'Male'; consent provided by the customer refers to \"Consumer consent provided?\" = 'Consent provided';"
}
|
{
"db_mode": "train",
"db_id": "retail_complains",
"gt_sql": "SELECT CAST(SUM(CASE WHEN T2.`Consumer consent provided?` = 'Consent provided' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.`Consumer consent provided?`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.sex = 'Male' AND T1.first = 'Mason' AND T1.middle = 'Javen' AND T1.last = 'Lopez'"
}
|
retail_complains
|
309
|
{
"db_schema": "CREATE TABLE state\n(\n\tStateCode TEXT constraint state_pk primary key,\n\tState TEXT, -- Example Values: `('Alabama',)`, `('Arkansas',)`, `('Arizona',)` | Value Statics: Total count 48 - Distinct count 48 - Null count 0 \n\tRegion TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0 \n);\n\nCREATE TABLE callcenterlogs\n(\n\t\"Date received\" DATE, -- Example Values: `('2017-03-27',)`, `('2017-03-23',)`, `('2017-03-22',)` | Value Statics: Total count 3999 - Distinct count 1842 - Null count 0 | Column Description: complaint date \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000175',)` | Value Statics: Total count 2504 - Distinct count 2504 - Null count 1495 | Column Description: unique id number representing each complaint \n\t\"rand client\" TEXT, -- Example Values: `('C00004587',)`, `('C00003328',)`, `('C00001685',)` | Value Statics: Total count 2504 - Distinct count 2019 - Null count 1495 | Column Description: client id \n\tphonefinal TEXT, -- Example Values: `('977-806-9726',)`, `('322-598-7152',)`, `('508-311-5237',)` | Value Statics: Total count 3999 - Distinct count 2744 - Null count 0 | Column Name Meaning: phone final | Column Description: final phone number \n\t\"vru+line\" TEXT, -- Example Values: `('AA0103',)`, `('AA0205',)`, `('AA0110',)` | Value Statics: Total count 3015 - Distinct count 27 - Null count 984 | Column Name Meaning: voice response unit line | Column Description: voice response unit line \n\tcall_id INTEGER, -- Example Values: `(34536,)`, `(34537,)`, `(34538,)` | Value Statics: Total count 3015 - Distinct count 3015 - Null count 984 | Column Name Meaning: call id | Column Description: id number identifying the call \n\tpriority INTEGER, -- Example Values: `0`, `2`, `1` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: priority of the complaint | Value Description: 0, 1, 2, null: not available, higher: -> higher priority, -> more serious/urgent complaint\n\ttype TEXT, -- Example Values: `NW`, `PS`, `NE`, `TT`, `IN` | Value Statics: Total count 3015 - Distinct count 6 - Null count 984 | Column Description: type of complaint \n\toutcome TEXT, -- Example Values: `AGENT`, `HANG`, `PHANTOM` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: the outcome of processing of complaints \n\tserver TEXT, -- Example Values: `('MICHAL',)`, `('TOVA',)`, `('YIFAT',)` | Value Statics: Total count 3015 - Distinct count 25 - Null count 984 | Column Description: server \n\tser_start TEXT, -- Example Values: `('13:34:11',)`, `('10:58:22',)`, `('13:00:54',)` | Value Statics: Total count 3999 - Distinct count 3733 - Null count 0 | Column Name Meaning: server start | Column Description: server start time | Value Description: HH:MM:SS\n\tser_exit TEXT, -- Example Values: `('13:40:23',)`, `('11:16:10',)`, `('13:13:31',)` | Value Statics: Total count 3999 - Distinct count 3738 - Null count 0 | Column Name Meaning: server exit | Column Description: server exit time \n\tser_time TEXT, -- Example Values: `('00:06:12',)`, `('00:17:48',)`, `('00:12:37',)` | Value Statics: Total count 3999 - Distinct count 1303 - Null count 0 | Column Name Meaning: server time | Column Description: server time | Value Description: longer server time referring to more verbose/longer complaint\n\tprimary key (\"Complaint ID\"),\n\tforeign key (\"rand client\") references client(client_id),\n);\n\nCREATE TABLE client\n(\n\tclient_id TEXT primary key,\n\tsex TEXT, -- Example Values: `Female`, `Male` | Value Statics: Total count 5369 - Distinct count 2 - Null count 0 | Column Description: sex of client \n\tday INTEGER, -- Example Values: `(13,)`, `(4,)`, `(9,)` | Value Statics: Total count 5369 - Distinct count 31 - Null count 0 | Column Description: day of the birthday \n\tmonth INTEGER, -- Example Values: `12`, `2`, `10`, `7`, `9` | Value Statics: Total count 5369 - Distinct count 12 - Null count 0 | Column Description: month of the birthday \n\tyear INTEGER, -- Example Values: `(1990,)`, `(1965,)`, `(1960,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: year when is born \n\tage INTEGER, -- Example Values: `(29,)`, `(54,)`, `(59,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: age | Value Description: teenager: 13-19 adult: 19-65 elder: > 65\n\tsocial TEXT, -- Example Values: `('926-93-2157',)`, `('806-94-5725',)`, `('614-70-9100',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: social number | Value Description: ssn: us id number for each person\n\tfirst TEXT, -- Example Values: `('Emma',)`, `('Noah',)`, `('Olivia',)` | Value Statics: Total count 5369 - Distinct count 2885 - Null count 0 | Column Description: first name \n\tmiddle TEXT, -- Example Values: `('Avaya',)`, `('Everest',)`, `('Brooklynne',)` | Value Statics: Total count 5369 - Distinct count 3925 - Null count 0 | Column Description: middle name \n\tlast TEXT, -- Example Values: `('Smith',)`, `('Thompson',)`, `('Johnson',)` | Value Statics: Total count 5369 - Distinct count 1769 - Null count 0 | Column Description: last name \n\tphone TEXT, -- Example Values: `('367-171-6840',)`, `('212-423-7734',)`, `('212-425-6932',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: phone number \n\temail TEXT, -- Example Values: `('emma.smith@gmail.com',)`, `('noah.thompson@gmail.com',)`, `('olivia.johnson@outlook.com',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: email | Value Description: google email / account: @gamil.com microsoft email / account: xxx@outlook.com\n\taddress_1 TEXT, -- Example Values: `('387 Wellington Ave.',)`, `('75 W. Berkshire St.',)`, `('36 Second St.',)` | Value Statics: Total count 5369 - Distinct count 5365 - Null count 0 | Column Description: address 1 \n\taddress_2 TEXT, -- Example Values: `('Unit 1',)`, `('Unit 6',)`, `('Unit 80',)` | Value Statics: Total count 83 - Distinct count 24 - Null count 5286 | Column Description: address 2 | Value Description: entire address = (address_1, address_2)\n\tcity TEXT, -- Example Values: `('Albuquerque',)`, `('New York City',)`, `('Indianapolis',)` | Value Statics: Total count 5369 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `('NM',)`, `('NY',)`, `('IN',)` | Value Statics: Total count 5369 - Distinct count 51 - Null count 0 | Column Description: state code \n\tzipcode INTEGER, -- Example Values: `(47246,)`, `(10040,)`, `(10162,)` | Value Statics: Total count 5369 - Distinct count 3512 - Null count 0 | Column Description: zipcode \n\tdistrict_id INTEGER, -- Example Values: `(18,)`, `(1,)`, `(5,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Name Meaning: district id | Column Description: district id number \n\tforeign key (district_id) references district(district_id),\n);\n\nCREATE TABLE district\n(\n\tdistrict_id INTEGER primary key,\n\tcity TEXT, -- Example Values: `('New York City',)`, `('Jacksonville',)`, `('Columbus',)` | Value Statics: Total count 77 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate_abbrev TEXT, -- Example Values: `('NY',)`, `('FL',)`, `('OH',)` | Value Statics: Total count 77 - Distinct count 51 - Null count 0 | Column Description: state abbreviated code \n\tdivision TEXT, -- Example Values: `Middle Atlantic`, `South Atlantic`, `East North Central`, `Pacific`, `Mountain` | Value Statics: Total count 77 - Distinct count 9 - Null count 0 | Column Description: division \n\tforeign key (state_abbrev) references state(StateCode),\n);\n\nCREATE TABLE events\n(\n\t\"Date received\" DATE, -- Example Values: `('2014-07-03',)`, `('2012-04-12',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1908 - Null count 0 | Column Description: Date received \n\tProduct TEXT, -- Example Values: `Bank account or service`, `Credit card` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: complaining about which product \n\t\"Sub-product\" TEXT, -- Example Values: `Checking account`, `Savings account`, `Other bank product/service`, `(CD) Certificate of deposit`, `Cashing a check without an account` | Value Statics: Total count 14091 - Distinct count 5 - Null count 9328 | Column Description: sub product if exists | Value Description: detailed product\n\tIssue TEXT, -- Example Values: `('Deposits and withdrawals',)`, `('Account opening, closing, or management',)`, `('Billing disputes',)` | Value Statics: Total count 23419 - Distinct count 38 - Null count 0 | Column Description: problems leading to this complaints \n\t\"Sub-issue\" TEXT, -- | Column Description: sub problems leading to this complaints if exists | Value Description: more detailed issue\n\t\"Consumer complaint narrative\" TEXT, -- | Column Description: Consumer complaint narrative \n\tTags TEXT, -- Example Values: `Older American`, `Older American, Servicemember`, `Servicemember` | Value Statics: Total count 3276 - Distinct count 3 - Null count 20143 | Column Description: tags of client \n\t\"Consumer consent provided?\" TEXT, -- Example Values: `N/A`, `Consent not provided`, `Consent provided`, `Other` | Value Statics: Total count 23323 - Distinct count 4 - Null count 96 | Column Name Meaning: Tags Consumer consent provided? | Column Description: whether the tags labeled under permission of the clients | Value Description: null, 'N/A' or empty value: indicating that the company didn't get the permission of consent. if the value is not empty: customers provide the consent for this tag.\n\t\"Submitted via\" TEXT, -- Example Values: `Email`, `Fax`, `Postal mail`, `Referral`, `Web` | Value Statics: Total count 23419 - Distinct count 6 - Null count 0 | Column Description: Submitted via \n\t\"Date sent to company\" TEXT, -- Example Values: `('2014-07-09',)`, `('2012-04-13',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1778 - Null count 0 | Column Description: Date sent to company | Value Description: delay of the complaints = 'Date sent to company'\n\t\"Company response to consumer\" TEXT, -- Example Values: `Closed with explanation`, `Closed with relief`, `Closed without relief`, `Closed with non-monetary relief`, `In progress` | Value Statics: Total count 23419 - Distinct count 8 - Null count 0 | Column Description: Company response to consumer \n\t\"Timely response?\" TEXT, -- Example Values: `Yes`, `No` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: whether the response of the company is timely \n\t\"Consumer disputed?\" TEXT, -- Example Values: `No`, `Yes` | Value Statics: Total count 22417 - Distinct count 2 - Null count 1002 | Column Description: whether the consumer dispute about the response from the company. \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000140',)` | Value Statics: Total count 23419 - Distinct count 23419 - Null count 0 | Column Description: id number indicating which complaint \n\tClient_ID TEXT, -- Example Values: `('C00003714',)`, `('C00001366',)`, `('C00002330',)` | Value Statics: Total count 23419 - Distinct count 5284 - Null count 0 | Column Name Meaning: Client ID | Column Description: id number indicating which client \n\tprimary key (\"Complaint ID\", Client_ID),\n\tforeign key (\"Complaint ID\") references callcenterlogs(\"Complaint ID\"),\n\tforeign key (Client_ID) references client(client_id),\n);\n\nCREATE TABLE reviews\n(\n\t\"Date\" DATE primary key,\n\tStars INTEGER, -- Example Values: `5`, `1`, `2` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tReviews TEXT, -- \n\tProduct TEXT, -- Example Values: `Eagle National Mortgage`, `Eagle National Bank`, `Eagle Capital` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tdistrict_id INTEGER, -- Example Values: `(65,)`, `(66,)`, `(23,)` | Value Statics: Total count 377 - Distinct count 77 - Null count 0 \n\tforeign key (district_id) references district(district_id),\n);",
"question": "What is the full address of the customers who, having received a timely response from the company, have dispute about that response?",
"evidence": "full address = address_1, address_2; received a timely response refers to Timely response? = 'Yes'; have dispute refers to \"Consumer disputed?\" = 'Yes';"
}
|
{
"db_mode": "train",
"db_id": "retail_complains",
"gt_sql": "SELECT T1.address_1, T1.address_2 FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Timely response?` = 'Yes' AND T2.`Consumer disputed?` = 'Yes'"
}
|
retail_complains
|
260
|
{
"db_schema": "CREATE TABLE state\n(\n\tStateCode TEXT constraint state_pk primary key,\n\tState TEXT, -- Example Values: `('Alabama',)`, `('Arkansas',)`, `('Arizona',)` | Value Statics: Total count 48 - Distinct count 48 - Null count 0 \n\tRegion TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0 \n);\n\nCREATE TABLE callcenterlogs\n(\n\t\"Date received\" DATE, -- Example Values: `('2017-03-27',)`, `('2017-03-23',)`, `('2017-03-22',)` | Value Statics: Total count 3999 - Distinct count 1842 - Null count 0 | Column Description: complaint date \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000175',)` | Value Statics: Total count 2504 - Distinct count 2504 - Null count 1495 | Column Description: unique id number representing each complaint \n\t\"rand client\" TEXT, -- Example Values: `('C00004587',)`, `('C00003328',)`, `('C00001685',)` | Value Statics: Total count 2504 - Distinct count 2019 - Null count 1495 | Column Description: client id \n\tphonefinal TEXT, -- Example Values: `('977-806-9726',)`, `('322-598-7152',)`, `('508-311-5237',)` | Value Statics: Total count 3999 - Distinct count 2744 - Null count 0 | Column Name Meaning: phone final | Column Description: final phone number \n\t\"vru+line\" TEXT, -- Example Values: `('AA0103',)`, `('AA0205',)`, `('AA0110',)` | Value Statics: Total count 3015 - Distinct count 27 - Null count 984 | Column Name Meaning: voice response unit line | Column Description: voice response unit line \n\tcall_id INTEGER, -- Example Values: `(34536,)`, `(34537,)`, `(34538,)` | Value Statics: Total count 3015 - Distinct count 3015 - Null count 984 | Column Name Meaning: call id | Column Description: id number identifying the call \n\tpriority INTEGER, -- Example Values: `0`, `2`, `1` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: priority of the complaint | Value Description: 0, 1, 2, null: not available, higher: -> higher priority, -> more serious/urgent complaint\n\ttype TEXT, -- Example Values: `NW`, `PS`, `NE`, `TT`, `IN` | Value Statics: Total count 3015 - Distinct count 6 - Null count 984 | Column Description: type of complaint \n\toutcome TEXT, -- Example Values: `AGENT`, `HANG`, `PHANTOM` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: the outcome of processing of complaints \n\tserver TEXT, -- Example Values: `('MICHAL',)`, `('TOVA',)`, `('YIFAT',)` | Value Statics: Total count 3015 - Distinct count 25 - Null count 984 | Column Description: server \n\tser_start TEXT, -- Example Values: `('13:34:11',)`, `('10:58:22',)`, `('13:00:54',)` | Value Statics: Total count 3999 - Distinct count 3733 - Null count 0 | Column Name Meaning: server start | Column Description: server start time | Value Description: HH:MM:SS\n\tser_exit TEXT, -- Example Values: `('13:40:23',)`, `('11:16:10',)`, `('13:13:31',)` | Value Statics: Total count 3999 - Distinct count 3738 - Null count 0 | Column Name Meaning: server exit | Column Description: server exit time \n\tser_time TEXT, -- Example Values: `('00:06:12',)`, `('00:17:48',)`, `('00:12:37',)` | Value Statics: Total count 3999 - Distinct count 1303 - Null count 0 | Column Name Meaning: server time | Column Description: server time | Value Description: longer server time referring to more verbose/longer complaint\n\tprimary key (\"Complaint ID\"),\n\tforeign key (\"rand client\") references client(client_id),\n);\n\nCREATE TABLE client\n(\n\tclient_id TEXT primary key,\n\tsex TEXT, -- Example Values: `Female`, `Male` | Value Statics: Total count 5369 - Distinct count 2 - Null count 0 | Column Description: sex of client \n\tday INTEGER, -- Example Values: `(13,)`, `(4,)`, `(9,)` | Value Statics: Total count 5369 - Distinct count 31 - Null count 0 | Column Description: day of the birthday \n\tmonth INTEGER, -- Example Values: `12`, `2`, `10`, `7`, `9` | Value Statics: Total count 5369 - Distinct count 12 - Null count 0 | Column Description: month of the birthday \n\tyear INTEGER, -- Example Values: `(1990,)`, `(1965,)`, `(1960,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: year when is born \n\tage INTEGER, -- Example Values: `(29,)`, `(54,)`, `(59,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: age | Value Description: teenager: 13-19 adult: 19-65 elder: > 65\n\tsocial TEXT, -- Example Values: `('926-93-2157',)`, `('806-94-5725',)`, `('614-70-9100',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: social number | Value Description: ssn: us id number for each person\n\tfirst TEXT, -- Example Values: `('Emma',)`, `('Noah',)`, `('Olivia',)` | Value Statics: Total count 5369 - Distinct count 2885 - Null count 0 | Column Description: first name \n\tmiddle TEXT, -- Example Values: `('Avaya',)`, `('Everest',)`, `('Brooklynne',)` | Value Statics: Total count 5369 - Distinct count 3925 - Null count 0 | Column Description: middle name \n\tlast TEXT, -- Example Values: `('Smith',)`, `('Thompson',)`, `('Johnson',)` | Value Statics: Total count 5369 - Distinct count 1769 - Null count 0 | Column Description: last name \n\tphone TEXT, -- Example Values: `('367-171-6840',)`, `('212-423-7734',)`, `('212-425-6932',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: phone number \n\temail TEXT, -- Example Values: `('emma.smith@gmail.com',)`, `('noah.thompson@gmail.com',)`, `('olivia.johnson@outlook.com',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: email | Value Description: google email / account: @gamil.com microsoft email / account: xxx@outlook.com\n\taddress_1 TEXT, -- Example Values: `('387 Wellington Ave.',)`, `('75 W. Berkshire St.',)`, `('36 Second St.',)` | Value Statics: Total count 5369 - Distinct count 5365 - Null count 0 | Column Description: address 1 \n\taddress_2 TEXT, -- Example Values: `('Unit 1',)`, `('Unit 6',)`, `('Unit 80',)` | Value Statics: Total count 83 - Distinct count 24 - Null count 5286 | Column Description: address 2 | Value Description: entire address = (address_1, address_2)\n\tcity TEXT, -- Example Values: `('Albuquerque',)`, `('New York City',)`, `('Indianapolis',)` | Value Statics: Total count 5369 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `('NM',)`, `('NY',)`, `('IN',)` | Value Statics: Total count 5369 - Distinct count 51 - Null count 0 | Column Description: state code \n\tzipcode INTEGER, -- Example Values: `(47246,)`, `(10040,)`, `(10162,)` | Value Statics: Total count 5369 - Distinct count 3512 - Null count 0 | Column Description: zipcode \n\tdistrict_id INTEGER, -- Example Values: `(18,)`, `(1,)`, `(5,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Name Meaning: district id | Column Description: district id number \n\tforeign key (district_id) references district(district_id),\n);\n\nCREATE TABLE district\n(\n\tdistrict_id INTEGER primary key,\n\tcity TEXT, -- Example Values: `('New York City',)`, `('Jacksonville',)`, `('Columbus',)` | Value Statics: Total count 77 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate_abbrev TEXT, -- Example Values: `('NY',)`, `('FL',)`, `('OH',)` | Value Statics: Total count 77 - Distinct count 51 - Null count 0 | Column Description: state abbreviated code \n\tdivision TEXT, -- Example Values: `Middle Atlantic`, `South Atlantic`, `East North Central`, `Pacific`, `Mountain` | Value Statics: Total count 77 - Distinct count 9 - Null count 0 | Column Description: division \n\tforeign key (state_abbrev) references state(StateCode),\n);\n\nCREATE TABLE events\n(\n\t\"Date received\" DATE, -- Example Values: `('2014-07-03',)`, `('2012-04-12',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1908 - Null count 0 | Column Description: Date received \n\tProduct TEXT, -- Example Values: `Bank account or service`, `Credit card` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: complaining about which product \n\t\"Sub-product\" TEXT, -- Example Values: `Checking account`, `Savings account`, `Other bank product/service`, `(CD) Certificate of deposit`, `Cashing a check without an account` | Value Statics: Total count 14091 - Distinct count 5 - Null count 9328 | Column Description: sub product if exists | Value Description: detailed product\n\tIssue TEXT, -- Example Values: `('Deposits and withdrawals',)`, `('Account opening, closing, or management',)`, `('Billing disputes',)` | Value Statics: Total count 23419 - Distinct count 38 - Null count 0 | Column Description: problems leading to this complaints \n\t\"Sub-issue\" TEXT, -- | Column Description: sub problems leading to this complaints if exists | Value Description: more detailed issue\n\t\"Consumer complaint narrative\" TEXT, -- | Column Description: Consumer complaint narrative \n\tTags TEXT, -- Example Values: `Older American`, `Older American, Servicemember`, `Servicemember` | Value Statics: Total count 3276 - Distinct count 3 - Null count 20143 | Column Description: tags of client \n\t\"Consumer consent provided?\" TEXT, -- Example Values: `N/A`, `Consent not provided`, `Consent provided`, `Other` | Value Statics: Total count 23323 - Distinct count 4 - Null count 96 | Column Name Meaning: Tags Consumer consent provided? | Column Description: whether the tags labeled under permission of the clients | Value Description: null, 'N/A' or empty value: indicating that the company didn't get the permission of consent. if the value is not empty: customers provide the consent for this tag.\n\t\"Submitted via\" TEXT, -- Example Values: `Email`, `Fax`, `Postal mail`, `Referral`, `Web` | Value Statics: Total count 23419 - Distinct count 6 - Null count 0 | Column Description: Submitted via \n\t\"Date sent to company\" TEXT, -- Example Values: `('2014-07-09',)`, `('2012-04-13',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1778 - Null count 0 | Column Description: Date sent to company | Value Description: delay of the complaints = 'Date sent to company'\n\t\"Company response to consumer\" TEXT, -- Example Values: `Closed with explanation`, `Closed with relief`, `Closed without relief`, `Closed with non-monetary relief`, `In progress` | Value Statics: Total count 23419 - Distinct count 8 - Null count 0 | Column Description: Company response to consumer \n\t\"Timely response?\" TEXT, -- Example Values: `Yes`, `No` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: whether the response of the company is timely \n\t\"Consumer disputed?\" TEXT, -- Example Values: `No`, `Yes` | Value Statics: Total count 22417 - Distinct count 2 - Null count 1002 | Column Description: whether the consumer dispute about the response from the company. \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000140',)` | Value Statics: Total count 23419 - Distinct count 23419 - Null count 0 | Column Description: id number indicating which complaint \n\tClient_ID TEXT, -- Example Values: `('C00003714',)`, `('C00001366',)`, `('C00002330',)` | Value Statics: Total count 23419 - Distinct count 5284 - Null count 0 | Column Name Meaning: Client ID | Column Description: id number indicating which client \n\tprimary key (\"Complaint ID\", Client_ID),\n\tforeign key (\"Complaint ID\") references callcenterlogs(\"Complaint ID\"),\n\tforeign key (Client_ID) references client(client_id),\n);\n\nCREATE TABLE reviews\n(\n\t\"Date\" DATE primary key,\n\tStars INTEGER, -- Example Values: `5`, `1`, `2` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tReviews TEXT, -- \n\tProduct TEXT, -- Example Values: `Eagle National Mortgage`, `Eagle National Bank`, `Eagle Capital` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tdistrict_id INTEGER, -- Example Values: `(65,)`, `(66,)`, `(23,)` | Value Statics: Total count 377 - Distinct count 77 - Null count 0 \n\tforeign key (district_id) references district(district_id),\n);",
"question": "Which detailed product did Mr Lennox Oliver Drake complain about?",
"evidence": "detailed product refers to \"Sub-product\"; Mr refers to sex = 'Male';"
}
|
{
"db_mode": "train",
"db_id": "retail_complains",
"gt_sql": "SELECT DISTINCT T2.`Sub-product` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Lennox' AND T1.middle = 'Oliver' AND T1.last = 'Drake' AND T1.sex = 'Male'"
}
|
retail_complains
|
287
|
{
"db_schema": "CREATE TABLE state\n(\n\tStateCode TEXT constraint state_pk primary key,\n\tState TEXT, -- Example Values: `('Alabama',)`, `('Arkansas',)`, `('Arizona',)` | Value Statics: Total count 48 - Distinct count 48 - Null count 0 \n\tRegion TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0 \n);\n\nCREATE TABLE callcenterlogs\n(\n\t\"Date received\" DATE, -- Example Values: `('2017-03-27',)`, `('2017-03-23',)`, `('2017-03-22',)` | Value Statics: Total count 3999 - Distinct count 1842 - Null count 0 | Column Description: complaint date \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000175',)` | Value Statics: Total count 2504 - Distinct count 2504 - Null count 1495 | Column Description: unique id number representing each complaint \n\t\"rand client\" TEXT, -- Example Values: `('C00004587',)`, `('C00003328',)`, `('C00001685',)` | Value Statics: Total count 2504 - Distinct count 2019 - Null count 1495 | Column Description: client id \n\tphonefinal TEXT, -- Example Values: `('977-806-9726',)`, `('322-598-7152',)`, `('508-311-5237',)` | Value Statics: Total count 3999 - Distinct count 2744 - Null count 0 | Column Name Meaning: phone final | Column Description: final phone number \n\t\"vru+line\" TEXT, -- Example Values: `('AA0103',)`, `('AA0205',)`, `('AA0110',)` | Value Statics: Total count 3015 - Distinct count 27 - Null count 984 | Column Name Meaning: voice response unit line | Column Description: voice response unit line \n\tcall_id INTEGER, -- Example Values: `(34536,)`, `(34537,)`, `(34538,)` | Value Statics: Total count 3015 - Distinct count 3015 - Null count 984 | Column Name Meaning: call id | Column Description: id number identifying the call \n\tpriority INTEGER, -- Example Values: `0`, `2`, `1` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: priority of the complaint | Value Description: 0, 1, 2, null: not available, higher: -> higher priority, -> more serious/urgent complaint\n\ttype TEXT, -- Example Values: `NW`, `PS`, `NE`, `TT`, `IN` | Value Statics: Total count 3015 - Distinct count 6 - Null count 984 | Column Description: type of complaint \n\toutcome TEXT, -- Example Values: `AGENT`, `HANG`, `PHANTOM` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: the outcome of processing of complaints \n\tserver TEXT, -- Example Values: `('MICHAL',)`, `('TOVA',)`, `('YIFAT',)` | Value Statics: Total count 3015 - Distinct count 25 - Null count 984 | Column Description: server \n\tser_start TEXT, -- Example Values: `('13:34:11',)`, `('10:58:22',)`, `('13:00:54',)` | Value Statics: Total count 3999 - Distinct count 3733 - Null count 0 | Column Name Meaning: server start | Column Description: server start time | Value Description: HH:MM:SS\n\tser_exit TEXT, -- Example Values: `('13:40:23',)`, `('11:16:10',)`, `('13:13:31',)` | Value Statics: Total count 3999 - Distinct count 3738 - Null count 0 | Column Name Meaning: server exit | Column Description: server exit time \n\tser_time TEXT, -- Example Values: `('00:06:12',)`, `('00:17:48',)`, `('00:12:37',)` | Value Statics: Total count 3999 - Distinct count 1303 - Null count 0 | Column Name Meaning: server time | Column Description: server time | Value Description: longer server time referring to more verbose/longer complaint\n\tprimary key (\"Complaint ID\"),\n\tforeign key (\"rand client\") references client(client_id),\n);\n\nCREATE TABLE client\n(\n\tclient_id TEXT primary key,\n\tsex TEXT, -- Example Values: `Female`, `Male` | Value Statics: Total count 5369 - Distinct count 2 - Null count 0 | Column Description: sex of client \n\tday INTEGER, -- Example Values: `(13,)`, `(4,)`, `(9,)` | Value Statics: Total count 5369 - Distinct count 31 - Null count 0 | Column Description: day of the birthday \n\tmonth INTEGER, -- Example Values: `12`, `2`, `10`, `7`, `9` | Value Statics: Total count 5369 - Distinct count 12 - Null count 0 | Column Description: month of the birthday \n\tyear INTEGER, -- Example Values: `(1990,)`, `(1965,)`, `(1960,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: year when is born \n\tage INTEGER, -- Example Values: `(29,)`, `(54,)`, `(59,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: age | Value Description: teenager: 13-19 adult: 19-65 elder: > 65\n\tsocial TEXT, -- Example Values: `('926-93-2157',)`, `('806-94-5725',)`, `('614-70-9100',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: social number | Value Description: ssn: us id number for each person\n\tfirst TEXT, -- Example Values: `('Emma',)`, `('Noah',)`, `('Olivia',)` | Value Statics: Total count 5369 - Distinct count 2885 - Null count 0 | Column Description: first name \n\tmiddle TEXT, -- Example Values: `('Avaya',)`, `('Everest',)`, `('Brooklynne',)` | Value Statics: Total count 5369 - Distinct count 3925 - Null count 0 | Column Description: middle name \n\tlast TEXT, -- Example Values: `('Smith',)`, `('Thompson',)`, `('Johnson',)` | Value Statics: Total count 5369 - Distinct count 1769 - Null count 0 | Column Description: last name \n\tphone TEXT, -- Example Values: `('367-171-6840',)`, `('212-423-7734',)`, `('212-425-6932',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: phone number \n\temail TEXT, -- Example Values: `('emma.smith@gmail.com',)`, `('noah.thompson@gmail.com',)`, `('olivia.johnson@outlook.com',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: email | Value Description: google email / account: @gamil.com microsoft email / account: xxx@outlook.com\n\taddress_1 TEXT, -- Example Values: `('387 Wellington Ave.',)`, `('75 W. Berkshire St.',)`, `('36 Second St.',)` | Value Statics: Total count 5369 - Distinct count 5365 - Null count 0 | Column Description: address 1 \n\taddress_2 TEXT, -- Example Values: `('Unit 1',)`, `('Unit 6',)`, `('Unit 80',)` | Value Statics: Total count 83 - Distinct count 24 - Null count 5286 | Column Description: address 2 | Value Description: entire address = (address_1, address_2)\n\tcity TEXT, -- Example Values: `('Albuquerque',)`, `('New York City',)`, `('Indianapolis',)` | Value Statics: Total count 5369 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `('NM',)`, `('NY',)`, `('IN',)` | Value Statics: Total count 5369 - Distinct count 51 - Null count 0 | Column Description: state code \n\tzipcode INTEGER, -- Example Values: `(47246,)`, `(10040,)`, `(10162,)` | Value Statics: Total count 5369 - Distinct count 3512 - Null count 0 | Column Description: zipcode \n\tdistrict_id INTEGER, -- Example Values: `(18,)`, `(1,)`, `(5,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Name Meaning: district id | Column Description: district id number \n\tforeign key (district_id) references district(district_id),\n);\n\nCREATE TABLE district\n(\n\tdistrict_id INTEGER primary key,\n\tcity TEXT, -- Example Values: `('New York City',)`, `('Jacksonville',)`, `('Columbus',)` | Value Statics: Total count 77 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate_abbrev TEXT, -- Example Values: `('NY',)`, `('FL',)`, `('OH',)` | Value Statics: Total count 77 - Distinct count 51 - Null count 0 | Column Description: state abbreviated code \n\tdivision TEXT, -- Example Values: `Middle Atlantic`, `South Atlantic`, `East North Central`, `Pacific`, `Mountain` | Value Statics: Total count 77 - Distinct count 9 - Null count 0 | Column Description: division \n\tforeign key (state_abbrev) references state(StateCode),\n);\n\nCREATE TABLE events\n(\n\t\"Date received\" DATE, -- Example Values: `('2014-07-03',)`, `('2012-04-12',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1908 - Null count 0 | Column Description: Date received \n\tProduct TEXT, -- Example Values: `Bank account or service`, `Credit card` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: complaining about which product \n\t\"Sub-product\" TEXT, -- Example Values: `Checking account`, `Savings account`, `Other bank product/service`, `(CD) Certificate of deposit`, `Cashing a check without an account` | Value Statics: Total count 14091 - Distinct count 5 - Null count 9328 | Column Description: sub product if exists | Value Description: detailed product\n\tIssue TEXT, -- Example Values: `('Deposits and withdrawals',)`, `('Account opening, closing, or management',)`, `('Billing disputes',)` | Value Statics: Total count 23419 - Distinct count 38 - Null count 0 | Column Description: problems leading to this complaints \n\t\"Sub-issue\" TEXT, -- | Column Description: sub problems leading to this complaints if exists | Value Description: more detailed issue\n\t\"Consumer complaint narrative\" TEXT, -- | Column Description: Consumer complaint narrative \n\tTags TEXT, -- Example Values: `Older American`, `Older American, Servicemember`, `Servicemember` | Value Statics: Total count 3276 - Distinct count 3 - Null count 20143 | Column Description: tags of client \n\t\"Consumer consent provided?\" TEXT, -- Example Values: `N/A`, `Consent not provided`, `Consent provided`, `Other` | Value Statics: Total count 23323 - Distinct count 4 - Null count 96 | Column Name Meaning: Tags Consumer consent provided? | Column Description: whether the tags labeled under permission of the clients | Value Description: null, 'N/A' or empty value: indicating that the company didn't get the permission of consent. if the value is not empty: customers provide the consent for this tag.\n\t\"Submitted via\" TEXT, -- Example Values: `Email`, `Fax`, `Postal mail`, `Referral`, `Web` | Value Statics: Total count 23419 - Distinct count 6 - Null count 0 | Column Description: Submitted via \n\t\"Date sent to company\" TEXT, -- Example Values: `('2014-07-09',)`, `('2012-04-13',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1778 - Null count 0 | Column Description: Date sent to company | Value Description: delay of the complaints = 'Date sent to company'\n\t\"Company response to consumer\" TEXT, -- Example Values: `Closed with explanation`, `Closed with relief`, `Closed without relief`, `Closed with non-monetary relief`, `In progress` | Value Statics: Total count 23419 - Distinct count 8 - Null count 0 | Column Description: Company response to consumer \n\t\"Timely response?\" TEXT, -- Example Values: `Yes`, `No` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: whether the response of the company is timely \n\t\"Consumer disputed?\" TEXT, -- Example Values: `No`, `Yes` | Value Statics: Total count 22417 - Distinct count 2 - Null count 1002 | Column Description: whether the consumer dispute about the response from the company. \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000140',)` | Value Statics: Total count 23419 - Distinct count 23419 - Null count 0 | Column Description: id number indicating which complaint \n\tClient_ID TEXT, -- Example Values: `('C00003714',)`, `('C00001366',)`, `('C00002330',)` | Value Statics: Total count 23419 - Distinct count 5284 - Null count 0 | Column Name Meaning: Client ID | Column Description: id number indicating which client \n\tprimary key (\"Complaint ID\", Client_ID),\n\tforeign key (\"Complaint ID\") references callcenterlogs(\"Complaint ID\"),\n\tforeign key (Client_ID) references client(client_id),\n);\n\nCREATE TABLE reviews\n(\n\t\"Date\" DATE primary key,\n\tStars INTEGER, -- Example Values: `5`, `1`, `2` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tReviews TEXT, -- \n\tProduct TEXT, -- Example Values: `Eagle National Mortgage`, `Eagle National Bank`, `Eagle Capital` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tdistrict_id INTEGER, -- Example Values: `(65,)`, `(66,)`, `(23,)` | Value Statics: Total count 377 - Distinct count 77 - Null count 0 \n\tforeign key (district_id) references district(district_id),\n);",
"question": "Among the calls from California, what percentage are priority 1?",
"evidence": "California refers to state = 'California'; percentage = MULTIPLY(DIVIDE(SUM(priority = 1), COUNT(\"Complaint ID\"), 1.0));"
}
|
{
"db_mode": "train",
"db_id": "retail_complains",
"gt_sql": "SELECT CAST(SUM(CASE WHEN T1.priority = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.priority) FROM callcenterlogs AS T1 INNER JOIN client AS T2 ON T1.`rand client` = T2.client_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id INNER JOIN state AS T4 ON T3.state_abbrev = T4.StateCode WHERE T4.State = 'California'"
}
|
retail_complains
|
311
|
{
"db_schema": "CREATE TABLE state\n(\n\tStateCode TEXT constraint state_pk primary key,\n\tState TEXT, -- Example Values: `('Alabama',)`, `('Arkansas',)`, `('Arizona',)` | Value Statics: Total count 48 - Distinct count 48 - Null count 0 \n\tRegion TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0 \n);\n\nCREATE TABLE callcenterlogs\n(\n\t\"Date received\" DATE, -- Example Values: `('2017-03-27',)`, `('2017-03-23',)`, `('2017-03-22',)` | Value Statics: Total count 3999 - Distinct count 1842 - Null count 0 | Column Description: complaint date \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000175',)` | Value Statics: Total count 2504 - Distinct count 2504 - Null count 1495 | Column Description: unique id number representing each complaint \n\t\"rand client\" TEXT, -- Example Values: `('C00004587',)`, `('C00003328',)`, `('C00001685',)` | Value Statics: Total count 2504 - Distinct count 2019 - Null count 1495 | Column Description: client id \n\tphonefinal TEXT, -- Example Values: `('977-806-9726',)`, `('322-598-7152',)`, `('508-311-5237',)` | Value Statics: Total count 3999 - Distinct count 2744 - Null count 0 | Column Name Meaning: phone final | Column Description: final phone number \n\t\"vru+line\" TEXT, -- Example Values: `('AA0103',)`, `('AA0205',)`, `('AA0110',)` | Value Statics: Total count 3015 - Distinct count 27 - Null count 984 | Column Name Meaning: voice response unit line | Column Description: voice response unit line \n\tcall_id INTEGER, -- Example Values: `(34536,)`, `(34537,)`, `(34538,)` | Value Statics: Total count 3015 - Distinct count 3015 - Null count 984 | Column Name Meaning: call id | Column Description: id number identifying the call \n\tpriority INTEGER, -- Example Values: `0`, `2`, `1` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: priority of the complaint | Value Description: 0, 1, 2, null: not available, higher: -> higher priority, -> more serious/urgent complaint\n\ttype TEXT, -- Example Values: `NW`, `PS`, `NE`, `TT`, `IN` | Value Statics: Total count 3015 - Distinct count 6 - Null count 984 | Column Description: type of complaint \n\toutcome TEXT, -- Example Values: `AGENT`, `HANG`, `PHANTOM` | Value Statics: Total count 3015 - Distinct count 3 - Null count 984 | Column Description: the outcome of processing of complaints \n\tserver TEXT, -- Example Values: `('MICHAL',)`, `('TOVA',)`, `('YIFAT',)` | Value Statics: Total count 3015 - Distinct count 25 - Null count 984 | Column Description: server \n\tser_start TEXT, -- Example Values: `('13:34:11',)`, `('10:58:22',)`, `('13:00:54',)` | Value Statics: Total count 3999 - Distinct count 3733 - Null count 0 | Column Name Meaning: server start | Column Description: server start time | Value Description: HH:MM:SS\n\tser_exit TEXT, -- Example Values: `('13:40:23',)`, `('11:16:10',)`, `('13:13:31',)` | Value Statics: Total count 3999 - Distinct count 3738 - Null count 0 | Column Name Meaning: server exit | Column Description: server exit time \n\tser_time TEXT, -- Example Values: `('00:06:12',)`, `('00:17:48',)`, `('00:12:37',)` | Value Statics: Total count 3999 - Distinct count 1303 - Null count 0 | Column Name Meaning: server time | Column Description: server time | Value Description: longer server time referring to more verbose/longer complaint\n\tprimary key (\"Complaint ID\"),\n\tforeign key (\"rand client\") references client(client_id),\n);\n\nCREATE TABLE client\n(\n\tclient_id TEXT primary key,\n\tsex TEXT, -- Example Values: `Female`, `Male` | Value Statics: Total count 5369 - Distinct count 2 - Null count 0 | Column Description: sex of client \n\tday INTEGER, -- Example Values: `(13,)`, `(4,)`, `(9,)` | Value Statics: Total count 5369 - Distinct count 31 - Null count 0 | Column Description: day of the birthday \n\tmonth INTEGER, -- Example Values: `12`, `2`, `10`, `7`, `9` | Value Statics: Total count 5369 - Distinct count 12 - Null count 0 | Column Description: month of the birthday \n\tyear INTEGER, -- Example Values: `(1990,)`, `(1965,)`, `(1960,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: year when is born \n\tage INTEGER, -- Example Values: `(29,)`, `(54,)`, `(59,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Description: age | Value Description: teenager: 13-19 adult: 19-65 elder: > 65\n\tsocial TEXT, -- Example Values: `('926-93-2157',)`, `('806-94-5725',)`, `('614-70-9100',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: social number | Value Description: ssn: us id number for each person\n\tfirst TEXT, -- Example Values: `('Emma',)`, `('Noah',)`, `('Olivia',)` | Value Statics: Total count 5369 - Distinct count 2885 - Null count 0 | Column Description: first name \n\tmiddle TEXT, -- Example Values: `('Avaya',)`, `('Everest',)`, `('Brooklynne',)` | Value Statics: Total count 5369 - Distinct count 3925 - Null count 0 | Column Description: middle name \n\tlast TEXT, -- Example Values: `('Smith',)`, `('Thompson',)`, `('Johnson',)` | Value Statics: Total count 5369 - Distinct count 1769 - Null count 0 | Column Description: last name \n\tphone TEXT, -- Example Values: `('367-171-6840',)`, `('212-423-7734',)`, `('212-425-6932',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: phone number \n\temail TEXT, -- Example Values: `('emma.smith@gmail.com',)`, `('noah.thompson@gmail.com',)`, `('olivia.johnson@outlook.com',)` | Value Statics: Total count 5369 - Distinct count 5369 - Null count 0 | Column Description: email | Value Description: google email / account: @gamil.com microsoft email / account: xxx@outlook.com\n\taddress_1 TEXT, -- Example Values: `('387 Wellington Ave.',)`, `('75 W. Berkshire St.',)`, `('36 Second St.',)` | Value Statics: Total count 5369 - Distinct count 5365 - Null count 0 | Column Description: address 1 \n\taddress_2 TEXT, -- Example Values: `('Unit 1',)`, `('Unit 6',)`, `('Unit 80',)` | Value Statics: Total count 83 - Distinct count 24 - Null count 5286 | Column Description: address 2 | Value Description: entire address = (address_1, address_2)\n\tcity TEXT, -- Example Values: `('Albuquerque',)`, `('New York City',)`, `('Indianapolis',)` | Value Statics: Total count 5369 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate TEXT, -- Example Values: `('NM',)`, `('NY',)`, `('IN',)` | Value Statics: Total count 5369 - Distinct count 51 - Null count 0 | Column Description: state code \n\tzipcode INTEGER, -- Example Values: `(47246,)`, `(10040,)`, `(10162,)` | Value Statics: Total count 5369 - Distinct count 3512 - Null count 0 | Column Description: zipcode \n\tdistrict_id INTEGER, -- Example Values: `(18,)`, `(1,)`, `(5,)` | Value Statics: Total count 5369 - Distinct count 77 - Null count 0 | Column Name Meaning: district id | Column Description: district id number \n\tforeign key (district_id) references district(district_id),\n);\n\nCREATE TABLE district\n(\n\tdistrict_id INTEGER primary key,\n\tcity TEXT, -- Example Values: `('New York City',)`, `('Jacksonville',)`, `('Columbus',)` | Value Statics: Total count 77 - Distinct count 75 - Null count 0 | Column Description: city \n\tstate_abbrev TEXT, -- Example Values: `('NY',)`, `('FL',)`, `('OH',)` | Value Statics: Total count 77 - Distinct count 51 - Null count 0 | Column Description: state abbreviated code \n\tdivision TEXT, -- Example Values: `Middle Atlantic`, `South Atlantic`, `East North Central`, `Pacific`, `Mountain` | Value Statics: Total count 77 - Distinct count 9 - Null count 0 | Column Description: division \n\tforeign key (state_abbrev) references state(StateCode),\n);\n\nCREATE TABLE events\n(\n\t\"Date received\" DATE, -- Example Values: `('2014-07-03',)`, `('2012-04-12',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1908 - Null count 0 | Column Description: Date received \n\tProduct TEXT, -- Example Values: `Bank account or service`, `Credit card` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: complaining about which product \n\t\"Sub-product\" TEXT, -- Example Values: `Checking account`, `Savings account`, `Other bank product/service`, `(CD) Certificate of deposit`, `Cashing a check without an account` | Value Statics: Total count 14091 - Distinct count 5 - Null count 9328 | Column Description: sub product if exists | Value Description: detailed product\n\tIssue TEXT, -- Example Values: `('Deposits and withdrawals',)`, `('Account opening, closing, or management',)`, `('Billing disputes',)` | Value Statics: Total count 23419 - Distinct count 38 - Null count 0 | Column Description: problems leading to this complaints \n\t\"Sub-issue\" TEXT, -- | Column Description: sub problems leading to this complaints if exists | Value Description: more detailed issue\n\t\"Consumer complaint narrative\" TEXT, -- | Column Description: Consumer complaint narrative \n\tTags TEXT, -- Example Values: `Older American`, `Older American, Servicemember`, `Servicemember` | Value Statics: Total count 3276 - Distinct count 3 - Null count 20143 | Column Description: tags of client \n\t\"Consumer consent provided?\" TEXT, -- Example Values: `N/A`, `Consent not provided`, `Consent provided`, `Other` | Value Statics: Total count 23323 - Distinct count 4 - Null count 96 | Column Name Meaning: Tags Consumer consent provided? | Column Description: whether the tags labeled under permission of the clients | Value Description: null, 'N/A' or empty value: indicating that the company didn't get the permission of consent. if the value is not empty: customers provide the consent for this tag.\n\t\"Submitted via\" TEXT, -- Example Values: `Email`, `Fax`, `Postal mail`, `Referral`, `Web` | Value Statics: Total count 23419 - Distinct count 6 - Null count 0 | Column Description: Submitted via \n\t\"Date sent to company\" TEXT, -- Example Values: `('2014-07-09',)`, `('2012-04-13',)`, `('2012-04-03',)` | Value Statics: Total count 23419 - Distinct count 1778 - Null count 0 | Column Description: Date sent to company | Value Description: delay of the complaints = 'Date sent to company'\n\t\"Company response to consumer\" TEXT, -- Example Values: `Closed with explanation`, `Closed with relief`, `Closed without relief`, `Closed with non-monetary relief`, `In progress` | Value Statics: Total count 23419 - Distinct count 8 - Null count 0 | Column Description: Company response to consumer \n\t\"Timely response?\" TEXT, -- Example Values: `Yes`, `No` | Value Statics: Total count 23419 - Distinct count 2 - Null count 0 | Column Description: whether the response of the company is timely \n\t\"Consumer disputed?\" TEXT, -- Example Values: `No`, `Yes` | Value Statics: Total count 22417 - Distinct count 2 - Null count 1002 | Column Description: whether the consumer dispute about the response from the company. \n\t\"Complaint ID\" TEXT, -- Example Values: `('CR0000072',)`, `('CR0000084',)`, `('CR0000140',)` | Value Statics: Total count 23419 - Distinct count 23419 - Null count 0 | Column Description: id number indicating which complaint \n\tClient_ID TEXT, -- Example Values: `('C00003714',)`, `('C00001366',)`, `('C00002330',)` | Value Statics: Total count 23419 - Distinct count 5284 - Null count 0 | Column Name Meaning: Client ID | Column Description: id number indicating which client \n\tprimary key (\"Complaint ID\", Client_ID),\n\tforeign key (\"Complaint ID\") references callcenterlogs(\"Complaint ID\"),\n\tforeign key (Client_ID) references client(client_id),\n);\n\nCREATE TABLE reviews\n(\n\t\"Date\" DATE primary key,\n\tStars INTEGER, -- Example Values: `5`, `1`, `2` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tReviews TEXT, -- \n\tProduct TEXT, -- Example Values: `Eagle National Mortgage`, `Eagle National Bank`, `Eagle Capital` | Value Statics: Total count 377 - Distinct count 3 - Null count 0 \n\tdistrict_id INTEGER, -- Example Values: `(65,)`, `(66,)`, `(23,)` | Value Statics: Total count 377 - Distinct count 77 - Null count 0 \n\tforeign key (district_id) references district(district_id),\n);",
"question": "List all the complaints narratives made by the customer named Brenda and last name Mayer.",
"evidence": "complaints narratives refers to \"Consumer complaint narrative\";"
}
|
{
"db_mode": "train",
"db_id": "retail_complains",
"gt_sql": "SELECT T2.`Consumer complaint narrative` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Brenda' AND T1.last = 'Mayer'"
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.