question_id
int64
0
16.1k
db_id
stringclasses
259 values
dber_id
stringlengths
15
29
question
stringlengths
16
325
SQL
stringlengths
18
1.25k
tokens
listlengths
4
62
entities
listlengths
0
21
entity_to_token
listlengths
20
20
dber_tags
listlengths
4
62
10,057
browser_web
spider:train_spider.json:1843
give me names of all compatible browsers and accelerators in the descending order of compatible year
SELECT T2.name , T3.name FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id = T3.id ORDER BY T1.compatible_since_year DESC
[ "give", "me", "names", "of", "all", "compatible", "browsers", "and", "accelerators", "in", "the", "descending", "order", "of", "compatible", "year" ]
[ { "id": 3, "type": "table", "value": "accelerator_compatible_browser" }, { "id": 1, "type": "table", "value": "web_client_accelerator" }, { "id": 2, "type": "column", "value": "compatible_since_year" }, { "id": 5, "type": "column", "value": "accelerator_id...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 14, 15 ] }, { "entity_id": 3, "token_idxs": [ 4, 5 ] }, { "entity_id": 4, "token_idxs": [ 6 ] ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "I-TABLE", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN" ]
10,058
public_review_platform
bird:train.json:3992
List all the tires businesses that are opened everyday.
SELECT DISTINCT T2.business_id FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id INNER JOIN Business_Hours AS T4 ON T3.business_id = T4.business_id WHERE T1.category_name = 'Tires' GROUP BY T2.business_id HAVING COU...
[ "List", "all", "the", "tires", "businesses", "that", "are", "opened", "everyday", "." ]
[ { "id": 8, "type": "table", "value": "business_categories" }, { "id": 1, "type": "table", "value": "business_hours" }, { "id": 2, "type": "column", "value": "category_name" }, { "id": 0, "type": "column", "value": "business_id" }, { "id": 9, "t...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 4 ...
[ "O", "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "O", "O" ]
10,059
retails
bird:train.json:6691
Which region does "Supplier#000000129" belong to?
SELECT T3.r_name FROM nation AS T1 INNER JOIN supplier AS T2 ON T1.n_nationkey = T2.s_nationkey INNER JOIN region AS T3 ON T1.n_regionkey = T3.r_regionkey WHERE T2.s_name = 'Supplier#000000129'
[ "Which", "region", "does", "\"", "Supplier#000000129", "\"", "belong", "to", "?" ]
[ { "id": 3, "type": "value", "value": "Supplier#000000129" }, { "id": 6, "type": "column", "value": "n_regionkey" }, { "id": 7, "type": "column", "value": "r_regionkey" }, { "id": 8, "type": "column", "value": "n_nationkey" }, { "id": 9, "type":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 4 ...
[ "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
10,060
driving_school
spider:train_spider.json:6704
How long is the total lesson time taught by staff with first name as Janessa and last name as Sawayn?
SELECT sum(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";
[ "How", "long", "is", "the", "total", "lesson", "time", "taught", "by", "staff", "with", "first", "name", "as", "Janessa", "and", "last", "name", "as", "Sawayn", "?" ]
[ { "id": 2, "type": "column", "value": "lesson_time" }, { "id": 4, "type": "column", "value": "first_name" }, { "id": 6, "type": "column", "value": "last_name" }, { "id": 3, "type": "column", "value": "staff_id" }, { "id": 0, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 11, 12 ] }, { ...
[ "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O" ]
10,061
computer_student
bird:train.json:1030
How many students that are undergoing the pre-phase of qualification have advisors?
SELECT COUNT(T1.p_id_dummy) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.inPhase = 'Pre_Quals' AND T2.student = 1
[ "How", "many", "students", "that", "are", "undergoing", "the", "pre", "-", "phase", "of", "qualification", "have", "advisors", "?" ]
[ { "id": 2, "type": "column", "value": "p_id_dummy" }, { "id": 0, "type": "table", "value": "advisedby" }, { "id": 5, "type": "value", "value": "Pre_Quals" }, { "id": 4, "type": "column", "value": "inphase" }, { "id": 6, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O" ]
10,062
movie_3
bird:train.json:9164
How much money did the customer No.297 pay for the rental which happened at 12:27:27 on 2005/7/28?
SELECT T1.amount FROM payment AS T1 INNER JOIN rental AS T2 ON T1.rental_id = T2.rental_id WHERE T2.rental_date = '2005-07-28 12:27:27' AND T2.customer_id = 297
[ "How", "much", "money", "did", "the", "customer", "No.297", "pay", "for", "the", "rental", "which", "happened", "at", "12:27:27", "on", "2005/7/28", "?" ]
[ { "id": 5, "type": "value", "value": "2005-07-28 12:27:27" }, { "id": 4, "type": "column", "value": "rental_date" }, { "id": 6, "type": "column", "value": "customer_id" }, { "id": 3, "type": "column", "value": "rental_id" }, { "id": 1, "type": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "B-COLUMN", "B-VALUE", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O" ]
10,063
world_development_indicators
bird:train.json:2220
How many countries have a latest population census in 2011? Indicate their full names.
SELECT COUNT(LongName) FROM country WHERE LatestPopulationCensus = '2011' UNION ALL SELECT LongName FROM country WHERE LatestPopulationCensus = '2011'
[ "How", "many", "countries", "have", "a", "latest", "population", "census", "in", "2011", "?", "Indicate", "their", "full", "names", "." ]
[ { "id": 1, "type": "column", "value": "latestpopulationcensus" }, { "id": 3, "type": "column", "value": "longname" }, { "id": 0, "type": "table", "value": "country" }, { "id": 2, "type": "value", "value": "2011" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 5, 6, 7 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [] ...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,064
university_basketball
spider:train_spider.json:1004
Count the number of universities that do not participate in the baketball match.
SELECT count(*) FROM university WHERE school_id NOT IN (SELECT school_id FROM basketball_match)
[ "Count", "the", "number", "of", "universities", "that", "do", "not", "participate", "in", "the", "baketball", "match", "." ]
[ { "id": 2, "type": "table", "value": "basketball_match" }, { "id": 0, "type": "table", "value": "university" }, { "id": 1, "type": "column", "value": "school_id" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 11, 12 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "to...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
10,065
california_schools
bird:dev.json:60
What are the websites for all the partially virtual chartered schools located in San Joaquin?
SELECT Website FROM schools WHERE County = 'San Joaquin' AND Virtual = 'P' AND Charter = 1
[ "What", "are", "the", "websites", "for", "all", "the", "partially", "virtual", "chartered", "schools", "located", "in", "San", "Joaquin", "?" ]
[ { "id": 3, "type": "value", "value": "San Joaquin" }, { "id": 0, "type": "table", "value": "schools" }, { "id": 1, "type": "column", "value": "website" }, { "id": 4, "type": "column", "value": "virtual" }, { "id": 6, "type": "column", "valu...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 13, 14 ] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "O" ]
10,066
car_retails
bird:train.json:1577
State 10 emails of UK Sales Rep who have the lowest credit limit.
SELECT DISTINCT T2.email FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE T2.jobTitle = 'Sales Rep' AND T1.country = 'UK' ORDER BY T1.creditLimit LIMIT 10
[ "State", "10", "emails", "of", "UK", "Sales", "Rep", "who", "have", "the", "lowest", "credit", "limit", "." ]
[ { "id": 4, "type": "column", "value": "salesrepemployeenumber" }, { "id": 5, "type": "column", "value": "employeenumber" }, { "id": 3, "type": "column", "value": "creditlimit" }, { "id": 1, "type": "table", "value": "customers" }, { "id": 2, "t...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11, 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "to...
[ "O", "O", "B-COLUMN", "O", "B-VALUE", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
10,067
country_language
bird:test.json:1366
What is the average justice scores among countries?
SELECT avg(justice_score) FROM countries
[ "What", "is", "the", "average", "justice", "scores", "among", "countries", "?" ]
[ { "id": 1, "type": "column", "value": "justice_score" }, { "id": 0, "type": "table", "value": "countries" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 4, 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O" ]
10,068
card_games
bird:dev.json:519
What is the language of the "Battlebond" set?
SELECT language FROM set_translations WHERE id IN ( SELECT id FROM sets WHERE name = 'Battlebond' )
[ "What", "is", "the", "language", "of", "the", "\"", "Battlebond", "\"", "set", "?" ]
[ { "id": 0, "type": "table", "value": "set_translations" }, { "id": 5, "type": "value", "value": "Battlebond" }, { "id": 1, "type": "column", "value": "language" }, { "id": 3, "type": "table", "value": "sets" }, { "id": 4, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "B-TABLE", "O" ]
10,069
public_review_platform
bird:train.json:3793
What is the average rating for the all Yelp businesses that open 24 hours?
SELECT CAST(SUM(T3.stars) AS REAL) / COUNT(T2.business_id) AS "avg" FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T1.attribute_name LIKE 'Open 24 Hours' AND T2.attribute_value LIKE 'TRUE'
[ "What", "is", "the", "average", "rating", "for", "the", "all", "Yelp", "businesses", "that", "open", "24", "hours", "?" ]
[ { "id": 2, "type": "table", "value": "business_attributes" }, { "id": 6, "type": "column", "value": "attribute_value" }, { "id": 4, "type": "column", "value": "attribute_name" }, { "id": 5, "type": "value", "value": "Open 24 Hours" }, { "id": 8, ...
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 11, ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
10,070
authors
bird:train.json:3655
What is the name of author with the ID of 1722?
SELECT Name FROM Author WHERE Id = 1722
[ "What", "is", "the", "name", "of", "author", "with", "the", "ID", "of", "1722", "?" ]
[ { "id": 0, "type": "table", "value": "author" }, { "id": 1, "type": "column", "value": "name" }, { "id": 3, "type": "value", "value": "1722" }, { "id": 2, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
10,071
cre_Theme_park
spider:train_spider.json:5910
Which tourist attractions can we get to by bus? Tell me the names of the attractions.
SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = "bus"
[ "Which", "tourist", "attractions", "can", "we", "get", "to", "by", "bus", "?", "Tell", "me", "the", "names", "of", "the", "attractions", "." ]
[ { "id": 0, "type": "table", "value": "tourist_attractions" }, { "id": 2, "type": "column", "value": "how_to_get_there" }, { "id": 1, "type": "column", "value": "name" }, { "id": 3, "type": "column", "value": "bus" } ]
[ { "entity_id": 0, "token_idxs": [ 1, 2 ] }, { "entity_id": 1, "token_idxs": [ 13 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
10,072
simpson_episodes
bird:train.json:4327
Calculate the total rating of winners in OFTA Television Award and WGA Award (TV).
SELECT SUM(T2.rating) FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.award_category IN ('Jupiter Award ', 'WGA Award (TV)');
[ "Calculate", "the", "total", "rating", "of", "winners", "in", "OFTA", "Television", "Award", "and", "WGA", "Award", "(", "TV", ")", "." ]
[ { "id": 2, "type": "column", "value": "award_category" }, { "id": 3, "type": "value", "value": "Jupiter Award " }, { "id": 4, "type": "value", "value": "WGA Award (TV)" }, { "id": 6, "type": "column", "value": "episode_id" }, { "id": 1, "type":...
[ { "entity_id": 0, "token_idxs": [ 12 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 11, 13, 14, 15 ] }, { "e...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
10,073
cre_Doc_and_collections
bird:test.json:705
Which document has between 2 and 4 number of documents ? List the document id and the number of related documents .
select document_object_id , count(*) from document_subset_members group by document_object_id having count(*) between 2 and 4;
[ "Which", "document", "has", "between", "2", "and", "4", "number", "of", "documents", "?", "List", "the", "document", "i", "d", "and", "the", "number", "of", "related", "documents", "." ]
[ { "id": 0, "type": "table", "value": "document_subset_members" }, { "id": 1, "type": "column", "value": "document_object_id" }, { "id": 2, "type": "value", "value": "2" }, { "id": 3, "type": "value", "value": "4" } ]
[ { "entity_id": 0, "token_idxs": [ 1, 2, 3 ] }, { "entity_id": 1, "token_idxs": [ 13, 14, 15 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, ...
[ "O", "B-TABLE", "I-TABLE", "I-TABLE", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O" ]
10,074
mondial_geo
bird:train.json:8302
Please list the deserts in the countries whose population is over 100000 and covers an area of under 500000.
SELECT T2.Desert FROM country AS T1 INNER JOIN geo_desert AS T2 ON T1.Code = T2.Country WHERE T1.Area > 100000 AND T1.Population < 500000
[ "Please", "list", "the", "deserts", "in", "the", "countries", "whose", "population", "is", "over", "100000", "and", "covers", "an", "area", "of", "under", "500000", "." ]
[ { "id": 2, "type": "table", "value": "geo_desert" }, { "id": 7, "type": "column", "value": "population" }, { "id": 1, "type": "table", "value": "country" }, { "id": 4, "type": "column", "value": "country" }, { "id": 0, "type": "column", "va...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
10,075
institution_sports
bird:test.json:1647
What are the cities and provinces of institutions?
SELECT City , Province FROM institution
[ "What", "are", "the", "cities", "and", "provinces", "of", "institutions", "?" ]
[ { "id": 0, "type": "table", "value": "institution" }, { "id": 2, "type": "column", "value": "province" }, { "id": 1, "type": "column", "value": "city" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-TABLE", "O" ]
10,076
european_football_2
bird:dev.json:1116
List down most tallest players' name.
SELECT player_name FROM (SELECT player_name, height, DENSE_RANK() OVER (ORDER BY height DESC) as rank FROM Player) WHERE rank = 1
[ "List", "down", "most", "tallest", "players", "'", "name", "." ]
[ { "id": 0, "type": "column", "value": "player_name" }, { "id": 3, "type": "table", "value": "player" }, { "id": 4, "type": "column", "value": "height" }, { "id": 1, "type": "column", "value": "rank" }, { "id": 2, "type": "value", "value": "...
[ { "entity_id": 0, "token_idxs": [ 5, 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O" ]
10,077
hockey
bird:train.json:7686
How many games did player Id "vanbijo01" win in the 1990 season?
SELECT W FROM Goalies WHERE playerID = 'vanbijo01' AND year = 1990
[ "How", "many", "games", "did", "player", "I", "d", "\"", "vanbijo01", "\"", "win", "in", "the", "1990", "season", "?" ]
[ { "id": 3, "type": "value", "value": "vanbijo01" }, { "id": 2, "type": "column", "value": "playerid" }, { "id": 0, "type": "table", "value": "goalies" }, { "id": 4, "type": "column", "value": "year" }, { "id": 5, "type": "value", "value": "...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5, 6 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { ...
[ "O", "O", "B-TABLE", "O", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "B-VALUE", "O", "O" ]
10,078
language_corpus
bird:train.json:5731
Indicate on how many different pages the word ripoll appears.
SELECT T3.page FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid INNER JOIN pages AS T3 ON T2.pid = T3.pid WHERE T1.word = 'ripoll'
[ "Indicate", "on", "how", "many", "different", "pages", "the", "word", "ripoll", "appears", "." ]
[ { "id": 5, "type": "table", "value": "pages_words" }, { "id": 3, "type": "value", "value": "ripoll" }, { "id": 1, "type": "table", "value": "pages" }, { "id": 4, "type": "table", "value": "words" }, { "id": 0, "type": "column", "value": "pa...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "O", "B-COLUMN", "B-TABLE", "B-COLUMN", "B-VALUE", "O", "O" ]
10,079
professional_basketball
bird:train.json:2917
Of the players drafted in NBA between 1990 and 2000, who has the most points in all-star? List the player's first name and last name.
SELECT T3.firstname, T3.lastname FROM player_allstar AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID INNER JOIN draft AS T3 ON T1.playerID = T3.playerID WHERE T2.year BETWEEN 1990 AND 2000 ORDER BY T1.points DESC LIMIT 1
[ "Of", "the", "players", "drafted", "in", "NBA", "between", "1990", "and", "2000", ",", "who", "has", "the", "most", "points", "in", "all", "-", "star", "?", "List", "the", "player", "'s", "first", "name", "and", "last", "name", "." ]
[ { "id": 7, "type": "table", "value": "player_allstar" }, { "id": 8, "type": "table", "value": "awards_players" }, { "id": 0, "type": "column", "value": "firstname" }, { "id": 1, "type": "column", "value": "lastname" }, { "id": 9, "type": "colum...
[ { "entity_id": 0, "token_idxs": [ 25, 26 ] }, { "entity_id": 1, "token_idxs": [ 28, 29 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 23 ] }, { "entity_id": 4, "token_idxs": [...
[ "O", "O", "B-TABLE", "B-TABLE", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O" ]
10,080
shipping
bird:train.json:5586
Among the shipments in 2017, how many of them have the destination in New Jersey?
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE STRFTIME('%Y', T1.ship_date) = '2017' AND T2.state = 'New Jersey'
[ "Among", "the", "shipments", "in", "2017", ",", "how", "many", "of", "them", "have", "the", "destination", "in", "New", "Jersey", "?" ]
[ { "id": 5, "type": "value", "value": "New Jersey" }, { "id": 7, "type": "column", "value": "ship_date" }, { "id": 0, "type": "table", "value": "shipment" }, { "id": 2, "type": "column", "value": "city_id" }, { "id": 4, "type": "column", "va...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O" ]
10,081
works_cycles
bird:train.json:7088
Add the number of businesses that indicate their home address as their address and those whose address corresponds to the shipping address.
SELECT SUM(CASE WHEN T2.Name = 'Home' THEN 1 ELSE 0 END) , SUM(CASE WHEN T2.Name = 'Shipping' THEN 1 ELSE 0 END) FROM BusinessEntityAddress AS T1 INNER JOIN AddressType AS T2 ON T1.AddressTypeID = T2.AddressTypeID
[ "Add", "the", "number", "of", "businesses", "that", "indicate", "their", "home", "address", "as", "their", "address", "and", "those", "whose", "address", "corresponds", "to", "the", "shipping", "address", "." ]
[ { "id": 0, "type": "table", "value": "businessentityaddress" }, { "id": 2, "type": "column", "value": "addresstypeid" }, { "id": 1, "type": "table", "value": "addresstype" }, { "id": 7, "type": "value", "value": "Shipping" }, { "id": 5, "type":...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 16 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "O" ]
10,082
retail_world
bird:train.json:6326
Among the products that are no longer in continuous production, how many of them have their supplier in the USA?
SELECT COUNT(T1.Discontinued) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.Country = 'USA' AND T1.Discontinued = 1
[ "Among", "the", "products", "that", "are", "no", "longer", "in", "continuous", "production", ",", "how", "many", "of", "them", "have", "their", "supplier", "in", "the", "USA", "?" ]
[ { "id": 2, "type": "column", "value": "discontinued" }, { "id": 3, "type": "column", "value": "supplierid" }, { "id": 1, "type": "table", "value": "suppliers" }, { "id": 0, "type": "table", "value": "products" }, { "id": 4, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 17 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O" ]
10,083
synthea
bird:train.json:1515
How many black patients stopped their care plan in 2017?
SELECT COUNT(DISTINCT T2.patient) FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.race = 'black' AND strftime('%Y', T1.STOP) = '2017'
[ "How", "many", "black", "patients", "stopped", "their", "care", "plan", "in", "2017", "?" ]
[ { "id": 0, "type": "table", "value": "careplans" }, { "id": 1, "type": "table", "value": "patients" }, { "id": 2, "type": "column", "value": "patient" }, { "id": 4, "type": "value", "value": "black" }, { "id": 3, "type": "column", "value": ...
[ { "entity_id": 0, "token_idxs": [ 6, 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id":...
[ "O", "O", "B-VALUE", "B-COLUMN", "B-COLUMN", "O", "B-TABLE", "I-TABLE", "O", "B-VALUE", "O" ]
10,085
product_catalog
spider:train_spider.json:316
Find the entry names of the catalog with the attribute that have the most entries.
SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.attribute_value = (SELECT attribute_value FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_value ORDER BY count(*) DESC LIMIT 1)
[ "Find", "the", "entry", "names", "of", "the", "catalog", "with", "the", "attribute", "that", "have", "the", "most", "entries", "." ]
[ { "id": 2, "type": "table", "value": "catalog_contents_additional_attributes" }, { "id": 0, "type": "column", "value": "catalog_entry_name" }, { "id": 1, "type": "table", "value": "catalog_contents" }, { "id": 4, "type": "column", "value": "catalog_entry_i...
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id":...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
10,086
superstore
bird:train.json:2371
Add the total profit of Patrick Gardner in the Central region.
SELECT SUM(T2.Profit) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Patrick Gardner' AND T1.Region = 'Central'
[ "Add", "the", "total", "profit", "of", "Patrick", "Gardner", "in", "the", "Central", "region", "." ]
[ { "id": 1, "type": "table", "value": "central_superstore" }, { "id": 5, "type": "value", "value": "Patrick Gardner" }, { "id": 4, "type": "column", "value": "Customer Name" }, { "id": 3, "type": "column", "value": "Customer ID" }, { "id": 7, "t...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
10,087
video_games
bird:train.json:3432
What publishers have the word 'Entertainment' in their name?
SELECT T.publisher_name FROM publisher AS T WHERE T.publisher_name LIKE '%Entertainment%'
[ "What", "publishers", "have", "the", "word", "'", "Entertainment", "'", "in", "their", "name", "?" ]
[ { "id": 2, "type": "value", "value": "%Entertainment%" }, { "id": 1, "type": "column", "value": "publisher_name" }, { "id": 0, "type": "table", "value": "publisher" } ]
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O" ]
10,088
movielens
bird:train.json:2263
Please list down the ID of actors and directors in action movies.
SELECT T2.actorid, T1.directorid FROM movies2directors AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid WHERE T1.genre = 'Action'
[ "Please", "list", "down", "the", "ID", "of", "actors", "and", "directors", "in", "action", "movies", "." ]
[ { "id": 2, "type": "table", "value": "movies2directors" }, { "id": 3, "type": "table", "value": "movies2actors" }, { "id": 1, "type": "column", "value": "directorid" }, { "id": 0, "type": "column", "value": "actorid" }, { "id": 6, "type": "colu...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "O", "B-VALUE", "B-COLUMN", "O" ]
10,089
student_loan
bird:train.json:4479
Calculate the ratio in percentage between the average number of female and male students who joined Fire Department organization.
SELECT CAST(SUM(IIF(T2.name IS NULL, 1, 0)) AS REAL) * 100 / COUNT(T1.name), CAST(SUM(IIF(T2.name IS NOT NULL, 1, 0)) AS REAL) * 100 / COUNT(T1.name) FROM enlist AS T1 LEFT JOIN male AS T2 ON T2.name = T1.name WHERE T1.organ = 'fire_department'
[ "Calculate", "the", "ratio", "in", "percentage", "between", "the", "average", "number", "of", "female", "and", "male", "students", "who", "joined", "Fire", "Department", "organization", "." ]
[ { "id": 3, "type": "value", "value": "fire_department" }, { "id": 0, "type": "table", "value": "enlist" }, { "id": 2, "type": "column", "value": "organ" }, { "id": 1, "type": "table", "value": "male" }, { "id": 4, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [ 18 ] }, { "entity_id": 3, "token_idxs": [ 16, 17 ] }, { "entity_id": 4, "token_idxs": [ 8 ] }, {...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "I-VALUE", "B-COLUMN", "O" ]
10,090
simpson_episodes
bird:train.json:4239
Indicate the name and category of the most recent award received by the show.
SELECT award, award_category FROM Award WHERE result = 'Winner' ORDER BY year DESC LIMIT 1;
[ "Indicate", "the", "name", "and", "category", "of", "the", "most", "recent", "award", "received", "by", "the", "show", "." ]
[ { "id": 2, "type": "column", "value": "award_category" }, { "id": 3, "type": "column", "value": "result" }, { "id": 4, "type": "value", "value": "Winner" }, { "id": 0, "type": "table", "value": "award" }, { "id": 1, "type": "column", "value...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 3, 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O" ]
10,091
planet_1
bird:test.json:1865
What level is Physician?
SELECT T1.Level FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID WHERE T2.position = "Physician";
[ "What", "level", "is", "Physician", "?" ]
[ { "id": 1, "type": "table", "value": "has_clearance" }, { "id": 6, "type": "column", "value": "employeeid" }, { "id": 4, "type": "column", "value": "Physician" }, { "id": 2, "type": "table", "value": "employee" }, { "id": 3, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-COLUMN", "O", "B-COLUMN", "O" ]
10,092
synthea
bird:train.json:1390
What is the id of the patient whose hypertension started most recently?
SELECT PATIENT FROM conditions WHERE START = ( SELECT MAX(START) FROM conditions WHERE DESCRIPTION = 'Hypertension' )
[ "What", "is", "the", "i", "d", "of", "the", "patient", "whose", "hypertension", "started", "most", "recently", "?" ]
[ { "id": 4, "type": "value", "value": "Hypertension" }, { "id": 3, "type": "column", "value": "description" }, { "id": 0, "type": "table", "value": "conditions" }, { "id": 1, "type": "column", "value": "patient" }, { "id": 2, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "B-COLUMN", "O", "O", "O" ]
10,093
cs_semester
bird:train.json:893
How many research postgraduate students are there?
SELECT COUNT(student_id) FROM student WHERE type = 'RPG'
[ "How", "many", "research", "postgraduate", "students", "are", "there", "?" ]
[ { "id": 3, "type": "column", "value": "student_id" }, { "id": 0, "type": "table", "value": "student" }, { "id": 1, "type": "column", "value": "type" }, { "id": 2, "type": "value", "value": "RPG" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O" ]
10,094
synthea
bird:train.json:1490
What drug is administered more often to treat child attention deficit disorder?
SELECT DESCRIPTION FROM medications WHERE REASONDESCRIPTION = 'Child attention deficit disorder' GROUP BY DESCRIPTION ORDER BY COUNT(DESCRIPTION) DESC LIMIT 1
[ "What", "drug", "is", "administered", "more", "often", "to", "treat", "child", "attention", "deficit", "disorder", "?" ]
[ { "id": 3, "type": "value", "value": "Child attention deficit disorder" }, { "id": 2, "type": "column", "value": "reasondescription" }, { "id": 0, "type": "table", "value": "medications" }, { "id": 1, "type": "column", "value": "description" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8, 9, 10, 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O" ]
10,095
e_commerce
bird:test.json:96
List the address, town and county information of the customers who live in the USA.
SELECT address_line_1 , town_city , county FROM Customers WHERE Country = 'USA'
[ "List", "the", "address", ",", "town", "and", "county", "information", "of", "the", "customers", "who", "live", "in", "the", "USA", "." ]
[ { "id": 1, "type": "column", "value": "address_line_1" }, { "id": 0, "type": "table", "value": "customers" }, { "id": 2, "type": "column", "value": "town_city" }, { "id": 4, "type": "column", "value": "country" }, { "id": 3, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "O" ]
10,096
codebase_community
bird:dev.json:614
Among the users who obtained the "Teacher" badge, calculate their percentage of users
SELECT CAST(COUNT(T1.Id) AS REAL) * 100 / (SELECT COUNT(Id) FROM users) FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.Name = 'Teacher'
[ "Among", "the", "users", "who", "obtained", "the", "\"", "Teacher", "\"", "badge", ",", "calculate", "their", "percentage", "of", "users" ]
[ { "id": 3, "type": "value", "value": "Teacher" }, { "id": 1, "type": "table", "value": "badges" }, { "id": 5, "type": "column", "value": "userid" }, { "id": 0, "type": "table", "value": "users" }, { "id": 2, "type": "column", "value": "name...
[ { "entity_id": 0, "token_idxs": [ 15 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE" ]
10,097
loan_1
spider:train_spider.json:3075
What are the names of customers who have a loan of more than 3000 in amount?
SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > 3000
[ "What", "are", "the", "names", "of", "customers", "who", "have", "a", "loan", "of", "more", "than", "3000", "in", "amount", "?" ]
[ { "id": 0, "type": "column", "value": "cust_name" }, { "id": 1, "type": "table", "value": "customer" }, { "id": 5, "type": "column", "value": "cust_id" }, { "id": 3, "type": "column", "value": "amount" }, { "id": 2, "type": "table", "value"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 15 ] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entit...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "O" ]
10,098
soccer_2
spider:train_spider.json:5019
What college has a student who successfully made the team in the role of a goalie?
SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'
[ "What", "college", "has", "a", "student", "who", "successfully", "made", "the", "team", "in", "the", "role", "of", "a", "goalie", "?" ]
[ { "id": 2, "type": "column", "value": "decision" }, { "id": 0, "type": "table", "value": "tryout" }, { "id": 5, "type": "value", "value": "goalie" }, { "id": 1, "type": "column", "value": "cname" }, { "id": 4, "type": "column", "value": "pp...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 15 ] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
10,099
software_company
bird:train.json:8516
Of the first 60,000 customers who sent a true response to the incentive mailing sent by the marketing department, how many of them are female?
SELECT COUNT(T1.ID) FROM Customers AS T1 INNER JOIN Mailings1_2 AS T2 ON T1.ID = T2.REFID WHERE T1.SEX = 'Female' AND T2.RESPONSE = 'true'
[ "Of", "the", "first", "60,000", "customers", "who", "sent", "a", "true", "response", "to", "the", "incentive", "mailing", "sent", "by", "the", "marketing", "department", ",", "how", "many", "of", "them", "are", "female", "?" ]
[ { "id": 1, "type": "table", "value": "mailings1_2" }, { "id": 0, "type": "table", "value": "customers" }, { "id": 6, "type": "column", "value": "response" }, { "id": 5, "type": "value", "value": "Female" }, { "id": 3, "type": "column", "val...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 13 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
10,100
movie_3
bird:train.json:9407
List the store ID of the films starred by Reese West with a duration of 100 minutes and below?
SELECT T4.store_id FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id INNER JOIN inventory AS T4 ON T3.film_id = T4.film_id WHERE T3.length < 100 AND T1.first_name = 'Reese' AND T1.last_name = 'West'
[ "List", "the", "store", "ID", "of", "the", "films", "starred", "by", "Reese", "West", "with", "a", "duration", "of", "100", "minutes", "and", "below", "?" ]
[ { "id": 6, "type": "column", "value": "first_name" }, { "id": 11, "type": "table", "value": "film_actor" }, { "id": 1, "type": "table", "value": "inventory" }, { "id": 8, "type": "column", "value": "last_name" }, { "id": 0, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 15 ...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-VALUE", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O" ]
10,101
professional_basketball
bird:train.json:2933
Give the player id of the man who had the most turnovers whose team missed the playoffs in year 1988.
SELECT T2.playerID FROM players_teams AS T1 INNER JOIN players AS T2 ON T1.playerID = T2.playerID WHERE T1.PostGP = 0 AND T1.year = 1988 ORDER BY T1.turnovers DESC LIMIT 1
[ "Give", "the", "player", "i", "d", "of", "the", "man", "who", "had", "the", "most", "turnovers", "whose", "team", "missed", "the", "playoffs", "in", "year", "1988", "." ]
[ { "id": 1, "type": "table", "value": "players_teams" }, { "id": 3, "type": "column", "value": "turnovers" }, { "id": 0, "type": "column", "value": "playerid" }, { "id": 2, "type": "table", "value": "players" }, { "id": 4, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { ...
[ "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-VALUE", "O" ]
10,102
protein_institute
spider:train_spider.json:1919
Show the institution type with an institution founded after 1990 and an institution with at least 1000 enrollment.
SELECT TYPE FROM institution WHERE founded > 1990 AND enrollment >= 1000
[ "Show", "the", "institution", "type", "with", "an", "institution", "founded", "after", "1990", "and", "an", "institution", "with", "at", "least", "1000", "enrollment", "." ]
[ { "id": 0, "type": "table", "value": "institution" }, { "id": 4, "type": "column", "value": "enrollment" }, { "id": 2, "type": "column", "value": "founded" }, { "id": 1, "type": "column", "value": "type" }, { "id": 3, "type": "value", "valu...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 17 ] }, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
10,103
boat_1
bird:test.json:852
What is the name of every sailor whose name contains the letter e?
SELECT name FROM Sailors WHERE name LIKE '%e%'
[ "What", "is", "the", "name", "of", "every", "sailor", "whose", "name", "contains", "the", "letter", "e", "?" ]
[ { "id": 0, "type": "table", "value": "sailors" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "value", "value": "%e%" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "O", "O" ]
10,104
debit_card_specializing
bird:dev.json:1509
Among the transactions made in the gas stations in the Czech Republic, how many of them are taken place after 2012/1/1?
SELECT COUNT(T1.TransactionID) FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T2.Country = 'CZE' AND STRFTIME('%Y', T1.Date) >= '2012'
[ "Among", "the", "transactions", "made", "in", "the", "gas", "stations", "in", "the", "Czech", "Republic", ",", "how", "many", "of", "them", "are", "taken", "place", "after", "2012/1/1", "?" ]
[ { "id": 0, "type": "table", "value": "transactions_1k" }, { "id": 2, "type": "column", "value": "transactionid" }, { "id": 3, "type": "column", "value": "gasstationid" }, { "id": 1, "type": "table", "value": "gasstations" }, { "id": 4, "type": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6, 7 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-VALUE", "O" ]
10,105
book_1
bird:test.json:530
What are the names of all books and their corresponding authors?
SELECT T3.title , T1.name FROM Author AS T1 JOIN Author_Book AS T2 ON T2.Author = T1.idAuthor JOIN Book AS T3 ON T2.isbn = T3.isbn
[ "What", "are", "the", "names", "of", "all", "books", "and", "their", "corresponding", "authors", "?" ]
[ { "id": 4, "type": "table", "value": "author_book" }, { "id": 7, "type": "column", "value": "idauthor" }, { "id": 3, "type": "table", "value": "author" }, { "id": 6, "type": "column", "value": "author" }, { "id": 0, "type": "column", "value...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O" ]
10,106
video_game
bird:test.json:1968
What are the titles of games that are played by players from Oklahoma college or Auburn college?
SELECT T1.Title FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.College = "Oklahoma" INTERSECT SELECT T1.Title FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3...
[ "What", "are", "the", "titles", "of", "games", "that", "are", "played", "by", "players", "from", "Oklahoma", "college", "or", "Auburn", "college", "?" ]
[ { "id": 6, "type": "table", "value": "game_player" }, { "id": 7, "type": "column", "value": "player_id" }, { "id": 3, "type": "column", "value": "Oklahoma" }, { "id": 2, "type": "column", "value": "college" }, { "id": 8, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [ 15 ] },...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-TABLE", "B-COLUMN", "O", "B-TABLE", "O", "B-COLUMN", "B-COLUMN", "O", "B-COLUMN", "O", "O" ]
10,107
customers_card_transactions
spider:train_spider.json:676
Return the number of accounts that the customer with the first name Art and last name Turcotte has.
SELECT count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Art" AND T2.customer_last_name = "Turcotte"
[ "Return", "the", "number", "of", "accounts", "that", "the", "customer", "with", "the", "first", "name", "Art", "and", "last", "name", "Turcotte", "has", "." ]
[ { "id": 3, "type": "column", "value": "customer_first_name" }, { "id": 5, "type": "column", "value": "customer_last_name" }, { "id": 2, "type": "column", "value": "customer_id" }, { "id": 1, "type": "table", "value": "customers" }, { "id": 0, "...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8, 9, 10, 11 ] }, { "entity_id": 4, "token_idxs": [ ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O" ]
10,108
talkingdata
bird:train.json:1129
Give the number of female users of "E派" brand devices.
SELECT COUNT(T2.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.gender = 'F' AND T2.phone_brand = 'E派'
[ "Give", "the", "number", "of", "female", "users", "of", "\"", "E派", "\"", "brand", "devices", "." ]
[ { "id": 1, "type": "table", "value": "phone_brand_device_model2" }, { "id": 5, "type": "column", "value": "phone_brand" }, { "id": 0, "type": "table", "value": "gender_age" }, { "id": 2, "type": "column", "value": "device_id" }, { "id": 3, "typ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "O", "B-COLUMN", "B-COLUMN", "O" ]
10,109
movie
bird:train.json:731
Which character has the longest screen time in the movie Batman?
SELECT T2.`Character Name` FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID WHERE T1.Title = 'Batman' ORDER BY T2.screentime DESC LIMIT 1
[ "Which", "character", "has", "the", "longest", "screen", "time", "in", "the", "movie", "Batman", "?" ]
[ { "id": 0, "type": "column", "value": "Character Name" }, { "id": 2, "type": "table", "value": "characters" }, { "id": 5, "type": "column", "value": "screentime" }, { "id": 6, "type": "column", "value": "movieid" }, { "id": 4, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, ...
[ "O", "B-TABLE", "B-COLUMN", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "B-TABLE", "B-VALUE", "O" ]
10,110
bike_1
spider:train_spider.json:148
What is the zip code that has the lowest average mean sea level pressure?
SELECT zip_code FROM weather GROUP BY zip_code ORDER BY avg(mean_sea_level_pressure_inches) LIMIT 1
[ "What", "is", "the", "zip", "code", "that", "has", "the", "lowest", "average", "mean", "sea", "level", "pressure", "?" ]
[ { "id": 2, "type": "column", "value": "mean_sea_level_pressure_inches" }, { "id": 1, "type": "column", "value": "zip_code" }, { "id": 0, "type": "table", "value": "weather" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [ 10, 11, 12, 13 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs...
[ "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
10,111
e_learning
spider:train_spider.json:3791
Find the latest logon date of the students whose family name is "Jaskolski" or "Langosh".
SELECT date_of_latest_logon FROM Students WHERE family_name = "Jaskolski" OR family_name = "Langosh"
[ "Find", "the", "latest", "logon", "date", "of", "the", "students", "whose", "family", "name", "is", "\"", "Jaskolski", "\"", "or", "\"", "Langosh", "\"", "." ]
[ { "id": 1, "type": "column", "value": "date_of_latest_logon" }, { "id": 2, "type": "column", "value": "family_name" }, { "id": 3, "type": "column", "value": "Jaskolski" }, { "id": 0, "type": "table", "value": "students" }, { "id": 4, "type": "c...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 1, 2, 3 ] }, { "entity_id": 2, "token_idxs": [ 9, 10 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_id...
[ "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O" ]
10,112
cars
bird:train.json:3084
When was the $32650.65157 car introduced to the market? State the year.
SELECT T1.model FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price = '32650.65157'
[ "When", "was", "the", "$", "32650.65157", "car", "introduced", "to", "the", "market", "?", "State", "the", "year", "." ]
[ { "id": 4, "type": "value", "value": "32650.65157" }, { "id": 0, "type": "column", "value": "model" }, { "id": 2, "type": "table", "value": "price" }, { "id": 3, "type": "column", "value": "price" }, { "id": 1, "type": "table", "value": "da...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
10,113
works_cycles
bird:train.json:7297
How many high-class products are sold by preferred vendors?
SELECT COUNT(T2.Name) FROM ProductVendor AS T1 INNER JOIN Product AS T2 USING (ProductID) INNER JOIN Vendor AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID WHERE T3.PreferredVendorStatus = 1 AND T2.Class = 'M'
[ "How", "many", "high", "-", "class", "products", "are", "sold", "by", "preferred", "vendors", "?" ]
[ { "id": 5, "type": "column", "value": "preferredvendorstatus" }, { "id": 4, "type": "column", "value": "businessentityid" }, { "id": 2, "type": "table", "value": "productvendor" }, { "id": 3, "type": "table", "value": "product" }, { "id": 0, "t...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "B-COLUMN", "B-TABLE", "O", "O", "O", "B-COLUMN", "B-TABLE", "O" ]
10,114
mental_health_survey
bird:train.json:4588
Please list all the common questions in 2014's survey and 2016's survey.
SELECT T1.questiontext FROM Question AS T1 INNER JOIN Answer AS T2 ON T1.questionid = T2.QuestionID WHERE T2.SurveyID IN (2014, 2016) GROUP BY T1.questiontext
[ "Please", "list", "all", "the", "common", "questions", "in", "2014", "'s", "survey", "and", "2016", "'s", "survey", "." ]
[ { "id": 0, "type": "column", "value": "questiontext" }, { "id": 6, "type": "column", "value": "questionid" }, { "id": 1, "type": "table", "value": "question" }, { "id": 3, "type": "column", "value": "surveyid" }, { "id": 2, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "O" ]
10,115
insurance_and_eClaims
spider:train_spider.json:1534
Which customers have an insurance policy with the type code "Deputy" or "Uniform"? Return the customer details.
SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = "Deputy" OR t1.policy_type_code = "Uniform"
[ "Which", "customers", "have", "an", "insurance", "policy", "with", "the", "type", "code", "\"", "Deputy", "\"", "or", "\"", "Uniform", "\"", "?", "Return", "the", "customer", "details", "." ]
[ { "id": 0, "type": "column", "value": "customer_details" }, { "id": 4, "type": "column", "value": "policy_type_code" }, { "id": 3, "type": "column", "value": "customer_id" }, { "id": 2, "type": "table", "value": "customers" }, { "id": 1, "type"...
[ { "entity_id": 0, "token_idxs": [ 21 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [ 20 ] }, { "entity_id": 4, "token_idxs": [ 6, 7, ...
[ "O", "B-TABLE", "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O" ]
10,116
european_football_1
bird:train.json:2795
What's the winning rate of Club Brugge in the 2021 Premier League?
SELECT CAST(COUNT(CASE WHEN T1.FTR = 'H' THEN 1 ELSE NULL END) + COUNT(CASE WHEN T1.FTR = 'A' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(t1.FTR) FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.season = 2021 AND T1.AwayTeam = 'Club Brugge' OR T1.HomeTeam = 'Club Brugge'
[ "What", "'s", "the", "winning", "rate", "of", "Club", "Brugge", "in", "the", "2021", "Premier", "League", "?" ]
[ { "id": 5, "type": "value", "value": "Club Brugge" }, { "id": 1, "type": "table", "value": "divisions" }, { "id": 3, "type": "column", "value": "division" }, { "id": 4, "type": "column", "value": "hometeam" }, { "id": 10, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 6, 7 ] ...
[ "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "B-VALUE", "O", "O", "O" ]
10,117
human_resources
bird:train.json:8979
What is the maximum salary of position "Trainer"?
SELECT maxsalary FROM position WHERE positiontitle = 'Trainee'
[ "What", "is", "the", "maximum", "salary", "of", "position", "\"", "Trainer", "\"", "?" ]
[ { "id": 2, "type": "column", "value": "positiontitle" }, { "id": 1, "type": "column", "value": "maxsalary" }, { "id": 0, "type": "table", "value": "position" }, { "id": 3, "type": "value", "value": "Trainee" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-VALUE", "O", "O" ]
10,118
image_and_language
bird:train.json:7601
Write 10 coordinates with the object class "pizza."
SELECT T1.IMG_ID, T1.X, T1.Y FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'pizza' LIMIT 10
[ "Write", "10", "coordinates", "with", "the", "object", "class", "\"", "pizza", ".", "\"" ]
[ { "id": 7, "type": "column", "value": "obj_class_id" }, { "id": 4, "type": "table", "value": "obj_classes" }, { "id": 5, "type": "column", "value": "obj_class" }, { "id": 3, "type": "table", "value": "img_obj" }, { "id": 0, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 5, 6 ] ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O", "O" ]
10,119
social_media
bird:train.json:798
What is the code of Gwynedd State?
SELECT DISTINCT StateCode FROM location WHERE State = 'Gwynedd'
[ "What", "is", "the", "code", "of", "Gwynedd", "State", "?" ]
[ { "id": 1, "type": "column", "value": "statecode" }, { "id": 0, "type": "table", "value": "location" }, { "id": 3, "type": "value", "value": "Gwynedd" }, { "id": 2, "type": "column", "value": "state" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
10,120
food_inspection_2
bird:train.json:6232
What is the result of the February 24, 2010 inspection involving the employee named "Arnold Holder"?
SELECT DISTINCT T2.results FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.inspection_date = '2010-02-24' AND T1.first_name = 'Arnold' AND T1.last_name = 'Holder'
[ "What", "is", "the", "result", "of", "the", "February", "24", ",", "2010", "inspection", "involving", "the", "employee", "named", "\"", "Arnold", "Holder", "\"", "?" ]
[ { "id": 4, "type": "column", "value": "inspection_date" }, { "id": 3, "type": "column", "value": "employee_id" }, { "id": 2, "type": "table", "value": "inspection" }, { "id": 5, "type": "value", "value": "2010-02-24" }, { "id": 6, "type": "colu...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 13 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-VALUE", "O", "O" ]
10,121
movie
bird:train.json:734
Which movie is the character Dr. Archibald 'Moonlight' Graham from?
SELECT T1.Title FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID WHERE T2.`Character Name` = 'Dr. Archibald ''Moonlight'' Graham'
[ "Which", "movie", "is", "the", "character", "Dr.", "Archibald", "'", "Moonlight", "'", "Graham", "from", "?" ]
[ { "id": 4, "type": "value", "value": "Dr. Archibald 'Moonlight' Graham" }, { "id": 3, "type": "column", "value": "Character Name" }, { "id": 2, "type": "table", "value": "characters" }, { "id": 5, "type": "column", "value": "movieid" }, { "id": 0, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 5, 6, 7, 8, 9, ...
[ "O", "B-TABLE", "O", "O", "B-TABLE", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
10,122
game_1
spider:train_spider.json:6049
Find the last and first name of students who are playing Football or Lacrosse.
SELECT T2.lname , T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.SportName = "Football" OR T1.SportName = "Lacrosse"
[ "Find", "the", "last", "and", "first", "name", "of", "students", "who", "are", "playing", "Football", "or", "Lacrosse", "." ]
[ { "id": 2, "type": "table", "value": "sportsinfo" }, { "id": 5, "type": "column", "value": "sportname" }, { "id": 6, "type": "column", "value": "Football" }, { "id": 7, "type": "column", "value": "Lacrosse" }, { "id": 3, "type": "table", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O" ]
10,123
world_development_indicators
bird:train.json:2244
What's the value of the indicator whose long definition is "Adolescent fertility rate is the number of births per 1,000 women ages 15-19." for the Arab World in 1960?
SELECT T1.Value FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName INNER JOIN Country AS T3 ON T1.CountryCode = T3.CountryCode WHERE T2.LongDefinition = 'Adolescent fertility rate is the number of births per 1,000 women ages 15-19.' AND T3.ShortName = 'Arab World' AND T1.Year = 1960
[ "What", "'s", "the", "value", "of", "the", "indicator", "whose", "long", "definition", "is", "\"", "Adolescent", "fertility", "rate", "is", "the", "number", "of", "births", "per", "1,000", "women", "ages", "15", "-", "19", ".", "\"", "for", "the", "Arab"...
[ { "id": 6, "type": "value", "value": "Adolescent fertility rate is the number of births per 1,000 women ages 15-19." }, { "id": 5, "type": "column", "value": "longdefinition" }, { "id": 11, "type": "column", "value": "indicatorname" }, { "id": 4, "type": "colu...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE",...
10,124
book_publishing_company
bird:train.json:178
Name the title and publisher for title ID BU 2075. Provide all the royalty percentage for all ranges.
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'
[ "Name", "the", "title", "and", "publisher", "for", "title", "ID", "BU", "2075", ".", "Provide", "all", "the", "royalty", "percentage", "for", "all", "ranges", "." ]
[ { "id": 5, "type": "table", "value": "publishers" }, { "id": 1, "type": "column", "value": "pub_name" }, { "id": 6, "type": "column", "value": "title_id" }, { "id": 9, "type": "table", "value": "roysched" }, { "id": 2, "type": "column", "va...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 0 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 18 ] }, { "entity_id": 4, "token_idxs": [ 14 ] }, { "entit...
[ "B-COLUMN", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-TABLE", "B-COLUMN", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O" ]
10,125
allergy_1
spider:train_spider.json:507
What are the student ids of students who don't have any allergies?
SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy
[ "What", "are", "the", "student", "ids", "of", "students", "who", "do", "n't", "have", "any", "allergies", "?" ]
[ { "id": 1, "type": "table", "value": "has_allergy" }, { "id": 0, "type": "table", "value": "student" }, { "id": 2, "type": "column", "value": "stuid" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
10,126
medicine_enzyme_interaction
spider:train_spider.json:970
What are the medicine and trade names that cannot interact with the enzyme with the product 'Heme'?
SELECT name , trade_name FROM medicine EXCEPT SELECT T1.name , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id JOIN enzyme AS T3 ON T3.id = T2.enzyme_id WHERE T3.product = 'Protoporphyrinogen IX'
[ "What", "are", "the", "medicine", "and", "trade", "names", "that", "can", "not", "interact", "with", "the", "enzyme", "with", "the", "product", "'", "Heme", "'", "?" ]
[ { "id": 6, "type": "table", "value": "medicine_enzyme_interaction" }, { "id": 5, "type": "value", "value": "Protoporphyrinogen IX" }, { "id": 9, "type": "column", "value": "medicine_id" }, { "id": 2, "type": "column", "value": "trade_name" }, { "id...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [ 16 ] }, ...
[ "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
10,127
talkingdata
bird:train.json:1174
Provide the locations and times of the events of app ID "8715964299802120000".
SELECT T1.longitude, T1.latitude, T1.timestamp FROM events AS T1 INNER JOIN app_events AS T2 ON T1.event_id = T2.event_id WHERE T2.app_id = 8715964299802120000
[ "Provide", "the", "locations", "and", "times", "of", "the", "events", "of", "app", "ID", "\"", "8715964299802120000", "\"", "." ]
[ { "id": 6, "type": "value", "value": "8715964299802120000" }, { "id": 4, "type": "table", "value": "app_events" }, { "id": 0, "type": "column", "value": "longitude" }, { "id": 2, "type": "column", "value": "timestamp" }, { "id": 1, "type": "col...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O", "O" ]
10,128
restaurant_1
spider:train_spider.json:2836
How many restaurant is the Sandwich type restaurant?
SELECT count(*) FROM Restaurant JOIN Type_Of_Restaurant ON Restaurant.ResID = Type_Of_Restaurant.ResID JOIN Restaurant_Type ON Type_Of_Restaurant.ResTypeID = Restaurant_Type.ResTypeID GROUP BY Type_Of_Restaurant.ResTypeID HAVING Restaurant_Type.ResTypeName = 'Sandwich'
[ "How", "many", "restaurant", "is", "the", "Sandwich", "type", "restaurant", "?" ]
[ { "id": 5, "type": "table", "value": "type_of_restaurant" }, { "id": 1, "type": "table", "value": "restaurant_type" }, { "id": 2, "type": "column", "value": "restypename" }, { "id": 4, "type": "table", "value": "restaurant" }, { "id": 0, "type"...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, "...
[ "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-COLUMN", "B-TABLE", "O" ]
10,129
culture_company
spider:train_spider.json:6997
What are the titles of movies and books corresponding to companies incorporated in China?
SELECT T1.title , T3.book_title FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id JOIN book_club AS T3 ON T3.book_club_id = T2.book_club_id WHERE T2.incorporated_in = 'China'
[ "What", "are", "the", "titles", "of", "movies", "and", "books", "corresponding", "to", "companies", "incorporated", "in", "China", "?" ]
[ { "id": 3, "type": "column", "value": "incorporated_in" }, { "id": 6, "type": "table", "value": "culture_company" }, { "id": 7, "type": "column", "value": "book_club_id" }, { "id": 1, "type": "column", "value": "book_title" }, { "id": 2, "type"...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11, 12 ] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entity_i...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O" ]
10,130
codebase_community
bird:dev.json:595
Which user have only one post history per post and having at least 1000 views?
SELECT T2.UserId FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T2.PostId = T3.Id WHERE T3.ViewCount >= 1000 GROUP BY T2.UserId HAVING COUNT(DISTINCT T2.PostHistoryTypeId) = 1
[ "Which", "user", "have", "only", "one", "post", "history", "per", "post", "and", "having", "at", "least", "1000", "views", "?" ]
[ { "id": 9, "type": "column", "value": "posthistorytypeid" }, { "id": 6, "type": "table", "value": "posthistory" }, { "id": 2, "type": "column", "value": "viewcount" }, { "id": 0, "type": "column", "value": "userid" }, { "id": 7, "type": "column...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "B-TABLE", "O", "O", "O", "B-TABLE", "B-TABLE", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O", "O" ]
10,131
card_games
bird:dev.json:402
What is the percentage of Story Spotlight cards that do not have a text box? List them by their ID.
SELECT CAST(SUM(CASE WHEN isTextless = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM cards WHERE isStorySpotlight = 1
[ "What", "is", "the", "percentage", "of", "Story", "Spotlight", "cards", "that", "do", "not", "have", "a", "text", "box", "?", "List", "them", "by", "their", "ID", "." ]
[ { "id": 1, "type": "column", "value": "isstoryspotlight" }, { "id": 6, "type": "column", "value": "istextless" }, { "id": 0, "type": "table", "value": "cards" }, { "id": 3, "type": "value", "value": "100" }, { "id": 4, "type": "column", "va...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 5, 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 20 ] }, { "entity_id"...
[ "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,132
social_media
bird:train.json:790
How many tweets have the male users posted in total?
SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Male'
[ "How", "many", "tweets", "have", "the", "male", "users", "posted", "in", "total", "?" ]
[ { "id": 0, "type": "table", "value": "twitter" }, { "id": 3, "type": "column", "value": "tweetid" }, { "id": 1, "type": "column", "value": "gender" }, { "id": 4, "type": "column", "value": "userid" }, { "id": 2, "type": "value", "value": "M...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "O", "O" ]
10,134
codebase_community
bird:dev.json:545
Among the posts owned by csgillespie, how many of them are root posts?
SELECT COUNT(T1.Id) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie' AND T1.ParentId IS NULL
[ "Among", "the", "posts", "owned", "by", "csgillespie", ",", "how", "many", "of", "them", "are", "root", "posts", "?" ]
[ { "id": 3, "type": "column", "value": "owneruserid" }, { "id": 4, "type": "column", "value": "displayname" }, { "id": 5, "type": "value", "value": "csgillespie" }, { "id": 6, "type": "column", "value": "parentid" }, { "id": 0, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
10,135
flight_1
spider:train_spider.json:431
Show the name of aircraft which fewest people have its certificate.
SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid GROUP BY T1.aid ORDER BY count(*) DESC LIMIT 1
[ "Show", "the", "name", "of", "aircraft", "which", "fewest", "people", "have", "its", "certificate", "." ]
[ { "id": 2, "type": "table", "value": "certificate" }, { "id": 3, "type": "table", "value": "aircraft" }, { "id": 1, "type": "column", "value": "name" }, { "id": 0, "type": "column", "value": "aid" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
10,136
book_publishing_company
bird:train.json:198
How many publishers are in the USA?
SELECT COUNT(pub_id) FROM publishers WHERE country = 'USA'
[ "How", "many", "publishers", "are", "in", "the", "USA", "?" ]
[ { "id": 0, "type": "table", "value": "publishers" }, { "id": 1, "type": "column", "value": "country" }, { "id": 3, "type": "column", "value": "pub_id" }, { "id": 2, "type": "value", "value": "USA" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O" ]
10,137
online_exams
bird:test.json:207
List all the student answer texts in descending order of count.
SELECT Student_Answer_Text FROM Student_Answers GROUP BY Student_Answer_Text ORDER BY COUNT(*) DESC
[ "List", "all", "the", "student", "answer", "texts", "in", "descending", "order", "of", "count", "." ]
[ { "id": 1, "type": "column", "value": "student_answer_text" }, { "id": 0, "type": "table", "value": "student_answers" } ]
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
10,138
performance_attendance
spider:train_spider.json:1317
Show the names of members and the location of the performances they attended.
SELECT T2.Name , T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID
[ "Show", "the", "names", "of", "members", "and", "the", "location", "of", "the", "performances", "they", "attended", "." ]
[ { "id": 3, "type": "table", "value": "member_attendance" }, { "id": 5, "type": "column", "value": "performance_id" }, { "id": 2, "type": "table", "value": "performance" }, { "id": 6, "type": "column", "value": "member_id" }, { "id": 1, "type": ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [ 4 ] }, ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "B-TABLE", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O" ]
10,139
hockey
bird:train.json:7675
In which month was the player who has won the most awards born?
SELECT T1.birthMon FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID GROUP BY T2.playerID ORDER BY COUNT(T2.award) DESC LIMIT 1
[ "In", "which", "month", "was", "the", "player", "who", "has", "won", "the", "most", "awards", "born", "?" ]
[ { "id": 3, "type": "table", "value": "awardsplayers" }, { "id": 0, "type": "column", "value": "playerid" }, { "id": 1, "type": "column", "value": "birthmon" }, { "id": 2, "type": "table", "value": "master" }, { "id": 4, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3, 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entity_id"...
[ "O", "O", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O" ]
10,140
candidate_poll
spider:train_spider.json:2423
What are the names of candidates who have a lower support rate than oppose rate?
SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t2.support_rate < t2.oppose_rate
[ "What", "are", "the", "names", "of", "candidates", "who", "have", "a", "lower", "support", "rate", "than", "oppose", "rate", "?" ]
[ { "id": 3, "type": "column", "value": "support_rate" }, { "id": 4, "type": "column", "value": "oppose_rate" }, { "id": 2, "type": "table", "value": "candidate" }, { "id": 5, "type": "column", "value": "people_id" }, { "id": 1, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 10, 11 ] }, { "entity_id": 4, "token_idxs": [ 13, 14 ]...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O" ]
10,141
movies_4
bird:train.json:548
Provide the titles and revenues of the movies produced by the DreamWorks company.
SELECT T1.title, T1.revenue FROM movie AS T1 INNER JOIN movie_company AS T2 ON T1.movie_id = T2.movie_id INNER JOIN production_company AS T3 ON T2.company_id = T3.company_id WHERE T3.company_name = 'DreamWorks'
[ "Provide", "the", "titles", "and", "revenues", "of", "the", "movies", "produced", "by", "the", "DreamWorks", "company", "." ]
[ { "id": 2, "type": "table", "value": "production_company" }, { "id": 6, "type": "table", "value": "movie_company" }, { "id": 3, "type": "column", "value": "company_name" }, { "id": 4, "type": "value", "value": "DreamWorks" }, { "id": 7, "type":...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 8, 9, 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 11 ] ...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-TABLE", "I-TABLE", "I-TABLE", "B-VALUE", "B-COLUMN", "O" ]
10,142
video_games
bird:train.json:3339
Give the number of games which were published by Ascaron Entertainment GmbH.
SELECT COUNT(T2.game_id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id WHERE T1.publisher_name = 'Ascaron Entertainment GmbH'
[ "Give", "the", "number", "of", "games", "which", "were", "published", "by", "Ascaron", "Entertainment", "GmbH." ]
[ { "id": 3, "type": "value", "value": "Ascaron Entertainment GmbH" }, { "id": 1, "type": "table", "value": "game_publisher" }, { "id": 2, "type": "column", "value": "publisher_name" }, { "id": 6, "type": "column", "value": "publisher_id" }, { "id": ...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9, 10, 11 ] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { "...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE" ]
10,143
phone_market
spider:train_spider.json:1978
How many phones are there?
SELECT count(*) FROM phone
[ "How", "many", "phones", "are", "there", "?" ]
[ { "id": 0, "type": "table", "value": "phone" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "O", "O", "O" ]
10,144
headphone_store
bird:test.json:920
Which headphone model has the highest price?
SELECT model FROM headphone ORDER BY price DESC LIMIT 1
[ "Which", "headphone", "model", "has", "the", "highest", "price", "?" ]
[ { "id": 0, "type": "table", "value": "headphone" }, { "id": 1, "type": "column", "value": "model" }, { "id": 2, "type": "column", "value": "price" } ]
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O" ]
10,146
works_cycles
bird:train.json:7465
What is the profit for the product "792"?
SELECT T1.ListPrice - T2.StandardCost FROM ProductListPriceHistory AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID = 792
[ "What", "is", "the", "profit", "for", "the", "product", "\"", "792", "\"", "?" ]
[ { "id": 0, "type": "table", "value": "productlistpricehistory" }, { "id": 1, "type": "table", "value": "productcosthistory" }, { "id": 5, "type": "column", "value": "standardcost" }, { "id": 2, "type": "column", "value": "productid" }, { "id": 4, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O" ]
10,148
cre_Students_Information_Systems
bird:test.json:494
Return the earliest date of loan in the record.
SELECT date_of_loan FROM Student_Loans ORDER BY date_of_loan ASC LIMIT 1
[ "Return", "the", "earliest", "date", "of", "loan", "in", "the", "record", "." ]
[ { "id": 0, "type": "table", "value": "student_loans" }, { "id": 1, "type": "column", "value": "date_of_loan" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3, 4, 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_id...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O" ]
10,149
hr_1
spider:train_spider.json:3408
What are the full names and salaries for any employees earning less than 6000?
SELECT first_name , last_name , salary FROM employees WHERE salary < 6000
[ "What", "are", "the", "full", "names", "and", "salaries", "for", "any", "employees", "earning", "less", "than", "6000", "?" ]
[ { "id": 1, "type": "column", "value": "first_name" }, { "id": 0, "type": "table", "value": "employees" }, { "id": 2, "type": "column", "value": "last_name" }, { "id": 3, "type": "column", "value": "salary" }, { "id": 4, "type": "value", "va...
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O" ]
10,150
european_football_2
bird:dev.json:1078
Which player is older, Aaron Lennon or Abdelaziz Barrada?
SELECT player_name FROM Player WHERE player_name IN ('Aaron Lennon', 'Abdelaziz Barrada') ORDER BY birthday ASC LIMIT 1
[ "Which", "player", "is", "older", ",", "Aaron", "Lennon", "or", "Abdelaziz", "Barrada", "?" ]
[ { "id": 3, "type": "value", "value": "Abdelaziz Barrada" }, { "id": 2, "type": "value", "value": "Aaron Lennon" }, { "id": 1, "type": "column", "value": "player_name" }, { "id": 4, "type": "column", "value": "birthday" }, { "id": 0, "type": "ta...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5, 6 ] }, { "entity_id": 3, "token_idxs": [ 8, 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "en...
[ "O", "B-TABLE", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "B-VALUE", "I-VALUE", "O" ]
10,151
school_bus
spider:train_spider.json:6349
Show the name, home city, and age for all drivers.
SELECT name , home_city , age FROM driver
[ "Show", "the", "name", ",", "home", "city", ",", "and", "age", "for", "all", "drivers", "." ]
[ { "id": 2, "type": "column", "value": "home_city" }, { "id": 0, "type": "table", "value": "driver" }, { "id": 1, "type": "column", "value": "name" }, { "id": 3, "type": "column", "value": "age" } ]
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4, 5 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
10,152
perpetrator
spider:train_spider.json:2315
What are the countries of perpetrators? Show each country and the corresponding number of perpetrators there.
SELECT Country , COUNT(*) FROM perpetrator GROUP BY Country
[ "What", "are", "the", "countries", "of", "perpetrators", "?", "Show", "each", "country", "and", "the", "corresponding", "number", "of", "perpetrators", "there", "." ]
[ { "id": 0, "type": "table", "value": "perpetrator" }, { "id": 1, "type": "column", "value": "country" } ]
[ { "entity_id": 0, "token_idxs": [ 15 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "O" ]
10,153
region_building
bird:test.json:334
For each building, return the name of the building and the name of the region it belongs to.
SELECT T1.Name , T2.Name FROM building AS T1 JOIN region AS T2 ON T1.Region_ID = T2.Region_ID
[ "For", "each", "building", ",", "return", "the", "name", "of", "the", "building", "and", "the", "name", "of", "the", "region", "it", "belongs", "to", "." ]
[ { "id": 3, "type": "column", "value": "region_id" }, { "id": 1, "type": "table", "value": "building" }, { "id": 2, "type": "table", "value": "region" }, { "id": 0, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 12 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 15 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
10,154
image_and_language
bird:train.json:7533
How many object elements are there on average in each image?
SELECT CAST(COUNT(OBJ_CLASS_ID) AS REAL) / COUNT(DISTINCT IMG_ID) FROM IMG_OBJ
[ "How", "many", "object", "elements", "are", "there", "on", "average", "in", "each", "image", "?" ]
[ { "id": 2, "type": "column", "value": "obj_class_id" }, { "id": 0, "type": "table", "value": "img_obj" }, { "id": 1, "type": "column", "value": "img_id" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
10,155
college_1
spider:train_spider.json:3244
What are the first names of all students in course ACCT-211?
SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211'
[ "What", "are", "the", "first", "names", "of", "all", "students", "in", "course", "ACCT-211", "?" ]
[ { "id": 7, "type": "column", "value": "class_code" }, { "id": 0, "type": "column", "value": "stu_fname" }, { "id": 2, "type": "column", "value": "crs_code" }, { "id": 3, "type": "value", "value": "ACCT-211" }, { "id": 1, "type": "table", "v...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O" ]
10,156
movie_platform
bird:train.json:66
How many users liked the movie "A Way of Life" to the highest extent?
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 = 'A Way of Life' AND T1.rating_score = 5
[ "How", "many", "users", "liked", "the", "movie", "\"", "A", "Way", "of", "Life", "\"", "to", "the", "highest", "extent", "?" ]
[ { "id": 5, "type": "value", "value": "A Way of Life" }, { "id": 6, "type": "column", "value": "rating_score" }, { "id": 4, "type": "column", "value": "movie_title" }, { "id": 3, "type": "column", "value": "movie_id" }, { "id": 0, "type": "table...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O" ]
10,157
wine_1
spider:train_spider.json:6592
What are the grapes, appelations, and wines with scores above 93, sorted by Name?
SELECT Grape , Appelation , Name FROM WINE WHERE Score > 93 ORDER BY Name
[ "What", "are", "the", "grapes", ",", "appelations", ",", "and", "wines", "with", "scores", "above", "93", ",", "sorted", "by", "Name", "?" ]
[ { "id": 2, "type": "column", "value": "appelation" }, { "id": 1, "type": "column", "value": "grape" }, { "id": 4, "type": "column", "value": "score" }, { "id": 0, "type": "table", "value": "wine" }, { "id": 3, "type": "column", "value": "na...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, ...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "O" ]
10,158
disney
bird:train.json:4712
Which director had the most popular film from 1937 to 1990?
SELECT T2.director FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name INNER JOIN movies_total_gross AS T3 ON T3.movie_title = T1.movie_title WHERE SUBSTR(T3.release_date, LENGTH(T3.release_date) - 3, LENGTH(T3.release_date)) BETWEEN '1937' AND '1990' ORDER BY CAST(REPLACE(trim(T3.total_gross, '...
[ "Which", "director", "had", "the", "most", "popular", "film", "from", "1937", "to", "1990", "?" ]
[ { "id": 1, "type": "table", "value": "movies_total_gross" }, { "id": 7, "type": "column", "value": "release_date" }, { "id": 6, "type": "column", "value": "movie_title" }, { "id": 11, "type": "column", "value": "total_gross" }, { "id": 4, "type...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "O" ]
10,159
address
bird:train.json:5214
Give the alias of the cities with an Asian population of 7.
SELECT T1.alias FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.asian_population = 7
[ "Give", "the", "alias", "of", "the", "cities", "with", "an", "Asian", "population", "of", "7", "." ]
[ { "id": 3, "type": "column", "value": "asian_population" }, { "id": 2, "type": "table", "value": "zip_data" }, { "id": 5, "type": "column", "value": "zip_code" }, { "id": 0, "type": "column", "value": "alias" }, { "id": 1, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8, 9 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entity_id"...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O" ]
10,160
allergy_1
spider:train_spider.json:490
How many students are there for each major?
SELECT major , count(*) FROM Student GROUP BY major
[ "How", "many", "students", "are", "there", "for", "each", "major", "?" ]
[ { "id": 0, "type": "table", "value": "student" }, { "id": 1, "type": "column", "value": "major" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O" ]