Database: legislator
Question: Calculate the percentage of the total number of current female legislators and past female legislators. State which one has the highest value.
Evidence: female refers to gender_bio = 'F'; calculation = MULTIPLY(DIVIDE(COUNT(current.gender_bio = 'F' THEN current.bioguide_id)), (COUNT(historical.gender_bio = 'F' then historical.bioguide_id)), 1.0); the highest value refers to MAX(calculation)
SQL: SELECT CAST(COUNT(CASE WHEN current.gender_bio = 'F' THEN current.bioguide_id ELSE NULL END) AS REAL) * 100 / ( SELECT COUNT(CASE WHEN historical.gender_bio = 'F' THEN historical.bioguide_id ELSE NULL END) FROM historical ) FROM current

Database: simpson_episodes
Question: How many crews were born in the USA?
Evidence: born in the USA refers to birth_country = 'USA'
SQL: SELECT COUNT(name) FROM Person WHERE birth_country = 'USA';

Database: soccer_2016
Question: How many matches have Mumbai Indians won?
Evidence: Mumbai Indians refers to Team_Name = 'Mumbai Indians'; won refers to Match_Winner
SQL: SELECT SUM(CASE WHEN T2.Team_Name = 'Mumbai Indians' THEN 1 ELSE 0 END) FROM Match AS T1 INNER JOIN Team AS T2 ON T2.Team_Id = T1.Match_Winner

Database: olympics
Question: What is the average age of the people who participated in the winter season?
Evidence: AVG(age) where season = 'Winter';
SQL: SELECT AVG(T2.age) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.season = 'Winter'

Database: world_development_indicators
Question: Which countries use Euro as their currency? List down the table name.
Evidence: CurrencyUnit = 'Euro';
SQL: SELECT TableName FROM Country WHERE CurrencyUnit = 'Euro'

Database: superstore
Question: List the products ordered by Matt Abelman from the Western store in 2013.
Evidence: ordered by Matt Abelman refers to "Customer Name" = 'Matt Abelman'; in 2013 refers to "Order Date" like '2013%'
SQL: SELECT DISTINCT T3.`Product Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T2.`Customer Name` = 'Matt Abelman' AND STRFTIME('%Y', T1.`Order Date`) = '2013'

Database: image_and_language
Question: Identify the border's coordinates on the X and Y axes that enclose a folk in image no. 6.
Evidence: coordinates on the X and Y axes refers to X and Y; folk refers to OBJ_CLASS = 'folk'; image no. 6 refers to IMG_ID = 6
SQL: SELECT 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 T1.IMG_ID = 6 AND T2.OBJ_CLASS = 'folk'

Database: language_corpus
Question: What is the word id for title "Sometent"?
Evidence: word id refers to wid
SQL: SELECT T2.wid FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T1.title = 'Sometent'

Database: shakespeare
Question: What is the name of the character that can be found in paragraph 8 of chapter 18820?
Evidence: name of the character refers to CharName; paragraph 8 refers to ParagraphNum = 8; chapter 18820 refers to chapter_id = 18820
SQL: SELECT T1.CharName FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.ParagraphNum = 8 AND T2.chapter_id = 18820

Database: coinmarketcap
Question: When is Devcoin most valuable in the market?
Evidence: when refers to date; most valuable refers to max(market_cap)
SQL: SELECT T2.date FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T1.name = 'Devcoin' ORDER BY T2.market_cap DESC LIMIT 1

Database: authors
Question: How many authors are affiliated with NASA Langley Research Center?
Evidence: NASA Langley Research Center is the Affiliation
SQL: SELECT COUNT(Name) FROM Author WHERE Affiliation = 'NASA Langley Research Center'

Database: car_retails
Question: What is the full address of the office where the employee who is a sales representative for the customer whose business is located in the city of New York works?
Evidence: full address = addressLine1 + addressLine2; NYC is a shortname of New York City.
SQL: SELECT T2.addressLine1, T2.addressLine2 FROM employees AS T1 INNER JOIN customers AS T2 ON T1.employeeNumber = T2.salesRepEmployeeNumber INNER JOIN offices AS T3 ON T1.officeCode = T3.officeCode WHERE T2.city = 'NYC' AND T1.jobTitle = 'Sales Rep'

Database: olympics
Question: What was the name of the Olympic game that John Aalberg took part in when he was 31?
Evidence: when he was 31 refers to age = 31; name of the Olympic games refers to games_name;
SQL: SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'John Aalberg' AND T2.age = 31

Database: public_review_platform
Question: List at least 10 users ID that has 4 as an average ratings of all reviews sent.
Evidence: 4 as an average rating refers to user_average_stars = 4
SQL: SELECT COUNT(user_id) FROM Users WHERE user_average_stars = 4 LIMIT 10

Database: public_review_platform
Question: How many times is the number of "Women's Clothing" Yelp businesses to "Men's Clothing"?
Evidence: "Women's Clothing" Yelp businesses refers to  category_name = 'Women''s Clothing'; "Men's Clothing" refers to category_name = 'Men''s Clothing'; times refers to DIVIDE(COUNT(category_name = 'Women''s Clothing'), COUNT(category_name = 'Men''s Clothing'))
SQL: SELECT CAST(SUM(CASE WHEN T2.category_name = 'Women''s Clothing' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.category_name = 'Men''s Clothing' THEN 1 ELSE 0 END) AS TIMES FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id

Database: video_games
Question: Please list the names of all the games published by 10TACLE Studios and are puzzles.
Evidence: name refers to game_name; published by 10TACLE Studios refers to publisher_name = '10TACLE Studios'; puzzle refers to genre_name = 'Puzzle'
SQL: SELECT T1.game_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id INNER JOIN genre AS T4 ON T1.genre_id = T4.id WHERE T3.publisher_name = '10TACLE Studios' AND T4.genre_name = 'Puzzle'

Database: simpson_episodes
Question: Among the person nominated for the Comedy Series Award in 2009, how many of them were born in California?
Evidence: nominated refers to result = 'Nominee'; born in California refers to birth_place = 'California'; in 2009 refers to year = 2009
SQL: SELECT COUNT(*) FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.year = 2009 AND T2.award = 'Comedy Series' AND T1.birth_region = 'California';

Database: retails
Question: List the phone numbers of suppliers from Japan.
Evidence: phone number refers to s_phone; Japan refers to n_name = 'JAPAN'
SQL: SELECT T1.s_phone FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T2.n_name = 'JAPAN'

Database: movies_4
Question: When was the release date of the latest movie in which Dariusz Wolski worked as a crew member?
Evidence: release date of the latest movie refers to max(release_date)
SQL: SELECT T1.release_date FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T3.person_name = 'Dariusz Wolski' ORDER BY T1.release_date DESC LIMIT 1

Database: sales
Question: What is the difference in price between HL Mountain Frame - Black, 42 and LL Mountain Frame - Black, 42?
Evidence: difference = SUBTRACT((Price WHERE Name = 'HL Mountain Frame - Black, 42'), (Price WHERE Name = 'HL Mountain Frame - Black, 42'));
SQL: SELECT ( SELECT Price FROM Products WHERE Name = 'HL Mountain Frame - Black, 42' ) - ( SELECT Price FROM Products WHERE Name = 'LL Mountain Frame - Black, 42' ) AS num

Database: authors
Question: Find the names of papers which are published in the year 1996.
SQL: SELECT Title FROM Paper WHERE year = 1996