Database: books
Question: Which publisher published Barry Eisler's book?
Evidence: "Barry Eisler" is the author_name; publisher refers to publisher_name
SQL: SELECT T4.publisher_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id INNER JOIN publisher AS T4 ON T4.publisher_id = T1.publisher_id WHERE T3.author_name = 'Barry Eisler'

Database: restaurant
Question: What is the name of the least popular Indian restaurant on Shattuck Avenue in Berkeley?
Evidence: restaurant name refers to label; the least popular refers to min(review); Indian restaurant refers to food_type = 'Indian restaurant'; Shattuck Avenue in Berkeley refers to street_name = 'shattuck ave' and city = 'berkeley'
SQL: SELECT T1.id_restaurant FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'berkeley' AND T2.street_name = 'shattuck ave' AND T1.food_type = 'Indian restaurant' ORDER BY T1.review LIMIT 1

Database: olympics
Question: How many athletes are there in the region where Clara Hughes is from?
SQL: SELECT COUNT(person_id) FROM person_region WHERE region_id = ( SELECT T1.region_id FROM person_region AS T1 INNER JOIN person AS T2 ON T1.person_id = T2.id WHERE T2.full_name = 'Clara Hughes' )

Database: movies_4
Question: What is the country ID of the movie with the title of "Pirates of the Caribbean: Dead Man's Chest"?
Evidence: title of "Pirates of the Caribbean: Dead Man's Chest" refers to title = 'Pirates of the Caribbean: Dead Man''s Chest'
SQL: SELECT T2.COUNTry_id FROM movie AS T1 INNER JOIN production_COUNTry AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title LIKE 'Pirates of the Caribbean: Dead Man%s Chest'

Database: codebase_comments
Question: What is the most liked repository? Indicate its github address and the amount of stars it has received.
Evidence: more stars mean more people like this repository; most liked refers to max(Stars); the github address of repository refers to Url;
SQL: SELECT Url, Stars FROM Repo WHERE Stars = ( SELECT MAX(Stars) FROM Repo )

Database: car_retails
Question: How many countries from the USA have an In Process order status?
Evidence: country = 'USA'
SQL: SELECT COUNT(t2.orderNumber) FROM customers AS t1 INNER JOIN orders AS t2 ON t1.customerNumber = t2.customerNumber WHERE t2.status = 'On Hold' AND t1.country = 'USA'

Database: donor
Question: How many schools with the highest level of poverty have received a portion of a donation included corporate sponsored gift card?
Evidence: highest level of poverty refers to poverty_level = 'highest'; received a portion of a donation included corporate sponsored gift card refers to payment_included_campaign_gift_card = 't'
SQL: SELECT COUNT(T1.schoolid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.payment_included_campaign_gift_card = 't' AND T1.poverty_level = 'highest poverty'

Database: address
Question: List all the bad alias for zip codes in Puerto Rico.
Evidence: "Puerto Rico" refers to state = 'PR'
SQL: SELECT T1.bad_alias FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.state = 'PR'

Database: soccer_2016
Question: Give the date of birth of the 2014 Orange Cap winner.
Evidence: date of birth refers to DOB; 2014 refers to Season_Year = 2014; Orange Cap winner refers to Orange_Cap IS NOT NULL
SQL: SELECT T2.DOB FROM Season AS T1 INNER JOIN Player AS T2 ON T1.Man_of_the_Series = T2.Player_Id WHERE T1.Season_Year = 2014 AND T1.Orange_Cap IS NOT NULL

Database: retail_world
Question: What is the average price of products with more than fifty units in stock?
Evidence: more than fifty units in stock refers to UnitsInStock > 50; average price = avg(UnitPrice where UnitsInStock > 50)
SQL: SELECT SUM(UnitPrice) / COUNT(UnitPrice) FROM Products WHERE UnitsInStock > 50

Database: language_corpus
Question: Calculate the percentage of pages that have 1500 different words.
Evidence: DIVIDE(COUNT(pages WHERE words = 1500), COUNT(pages)) as percentage;
SQL: SELECT CAST(COUNT(CASE WHEN words = 1500 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(page) FROM pages WHERE words > 300 LIMIT 3

Database: retails
Question: How many customers are in debt?
Evidence: customers are in debt refer to c_custkey where c_acctbal < 0;
SQL: SELECT COUNT(c_custkey) FROM customer WHERE c_acctbal < 0

Database: world_development_indicators
Question: List the series code of country with country notes description as "Data sources : Eurostat" and state the Wb2Code of these countries.
SQL: SELECT T2.seriescode, T1.Wb2Code FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Data sources : Eurostat'

Database: books
Question: List the email of customers that bought the book titled Switch on the Night.
Evidence: "Switch on the Night" is the title
SQL: SELECT T4.email FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T1.title = 'Switch on the Night'

Database: retails
Question: How many orders in total are made by customers in Germany?
Evidence: orders refer to o_orderkey; Germany is the name of the nation which refers to n_name = 'GERMANY';
SQL: SELECT COUNT(T2.c_custkey) FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN orders AS T3 ON T2.c_custkey = T3.o_custkey WHERE T1.n_name = 'GERMANY'

Database: movie_platform
Question: Between 1/1/2010 to 12/31/2020, how many users, who were a trialist when they created the list, gave the movie "The Secret Life of Words" a rating score of 3?
Evidence: Between 1/1/2010 to 12/31/2020 refers to rating_timestamp_utc between '2010-01-01%' and '2020-12-31%'; a trialist refers to user_trialist = 1; movie "The Secret Life of Words" refers to movie_title = 'The Secret Life of Words'; rating score of 3 refers to rating_score = 3
SQL: SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'The Secret Life of Words' AND T1.rating_score = 3 AND T1.user_trialist = 0 AND T1.rating_timestamp_utc BETWEEN '2010%' AND '2020%'

Database: movies_4
Question: Write me the titles of the movies starring Jim Carrey.
Evidence: Jim Carrey is the person_name;
SQL: SELECT T1.title FROM movie AS T1 INNER JOIN movie_cast 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 = 'Jim Carrey'

Database: image_and_language
Question: What are the attributes of the widest object in image 400?
Evidence: attributes refer to ATT_CLASS; the widest relates to the width of the bounding
box of the object which refers to MAX(W); image 400 refers to IMG_ID = 400;
SQL: SELECT T1.ATT_CLASS FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID WHERE T2.IMG_ID = 400 ORDER BY T3.W DESC LIMIT 1

Database: movie_3
Question: Who is the staff manager in store id 2?
Evidence: staff manager refers to manager_staff_id
SQL: SELECT manager_staff_id FROM store WHERE store_id = 2

Database: world_development_indicators
Question: How many footnotes have been made in year 1980 and what are the table names of these countries that made the footnotes?
Evidence: year 1980 refers to Year = 'YR1980';
SQL: SELECT COUNT(T2.Description) FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Year = 'YR1980' UNION ALL SELECT DISTINCT T1.TableName FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Year = 'YR1980'