Database: coinmarketcap
Question: What was the average price of a Bitcoin in the year 2013?
Evidence: average price refers SUM(price)/COUNT(named = 'Bitcoin'); in the year 2013 refers to year(date) = 2013
SQL: SELECT AVG(T2.price) FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE STRFTIME('%Y', T2.date) = '2013' AND T1.name = 'Bitcoin'

Database: car_retails
Question: Calculate the average amount of payments made by customers during the first half of 2004.
Evidence: average amount of payments = DIVIDE(SUM(amount), COUNT(customerNumber); first half of 2014 refers to paymentDate > = '2004-01-01' AND paymentDate < '2004-07-01;
SQL: SELECT AVG(amount) FROM payments WHERE paymentDate BETWEEN '2004-01-01' AND '2004-06-30'

Database: genes
Question: Among the pairs of genes that are both located in the nucleus, what is the highest expression correlation score?
SQL: SELECT T2.Expression_Corr FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 INNER JOIN Genes AS T3 ON T3.GeneID = T2.GeneID2 WHERE T1.Localization = 'nucleus' AND T3.Localization = 'nucleus' ORDER BY T2.Expression_Corr DESC LIMIT 1

Database: movie_3
Question: Give the number of inactive customers.
Evidence: inactive refers to active = 0
SQL: SELECT COUNT(customer_id) FROM customer WHERE active = 0

Database: mental_health_survey
Question: What is the percentage of the the users who would bring up a mental health issue with a potential employer in an interview?
Evidence: Percentage = DIVIDE(SUM(AnswerText = 'Yes' Or AnswerText = 'Maybe'), COUNT(QuestionID = 12))* 100
SQL: SELECT CAST(SUM(CASE  WHEN T1.AnswerText LIKE 'Yes' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.UserID) FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questionid = 12

Database: talkingdata
Question: How many device users are male?
Evidence: male refers to gender = 'M';
SQL: SELECT COUNT(device_id) FROM gender_age WHERE gender = 'M'

Database: book_publishing_company
Question: Name the top five titles that sold more than average and list them in descending order of the number of sales in California stores?
Evidence: qty is abbreviation for quantity; sold more than average refers to qty > AVG(qty); california refers to state = 'CA"
SQL: SELECT T1.title FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id INNER JOIN publishers AS T3 ON T1.pub_id = T3.pub_id WHERE T2.qty > ( SELECT CAST(SUM(qty) AS REAL) / COUNT(title_id) FROM sales ) AND T3.state = 'CA' ORDER BY T2.qty DESC LIMIT 5

Database: university
Question: What is the student staff ratio of Harvard University in 2012?
Evidence: Harvard University refers to university_name = 'Harvard University'; in 2012 refers to year = 2012
SQL: SELECT T1.student_staff_ratio FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T2.university_name = 'Harvard University' AND T1.year = 2012

Database: address
Question: Please list the names of all the counties with at least one residential area that implements daylight saving.
Evidence: implements daylight savings refers to daylight_savings = 'Yes'
SQL: SELECT DISTINCT T2.county FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T1.daylight_savings = 'Yes'

Database: soccer_2016
Question: How many percent of the toss-winners decided to bowl first on the pitch from 2010 to 2016?
Evidence: decide to bowl first refers to Toss_Name = 'field'; from 2010 to 2016 refers to Match_Date BETWEEN '2010-01-01' AND '2016-12-31'; percent = divide(count(Toss_Id where Toss_Name = 'field'), count(Toss_Id)) * 100% where Match_Date BETWEEN '2010-01-01' AND '2016-12-31'
SQL: SELECT CAST(SUM(CASE WHEN T2.Toss_Name = 'field' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.Toss_Id) FROM Match AS T1 INNER JOIN Toss_Decision AS T2 ON T2.Toss_Id = T1.Toss_Decide WHERE T1.Match_Date BETWEEN '2010-01-01' AND '2016-12-31'

Database: public_review_platform
Question: What is the number of useful votes that the user 52592 received when reviewed for business number 2?
Evidence: number of useful votes refers to review_votes_useful; business number refers to business_id;
SQL: SELECT review_votes_useful FROM Reviews WHERE user_id = 52592 AND business_id = 2

Database: restaurant
Question: Identify all the restaurants in Yolo County by their label.
SQL: SELECT T1.id_restaurant, T1.label FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'yolo county'

Database: retail_world
Question: Which region is "Columbia" in?
Evidence: region refers to RegionID; "Columbia" refers to TerritoryDescription = 'Columbia'
SQL: SELECT T2.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T1.TerritoryDescription = 'Columbia'

Database: student_loan
Question: Which school have the highest student enrollment? How many of those students are filed for bankruptcy?
Evidence: highest student enrollment refers to MAX(COUNT(school));
SQL: SELECT T.school, num FROM ( SELECT T1.school, COUNT(T2.name) AS num FROM enrolled AS T1 LEFT JOIN filed_for_bankrupcy AS T2 ON T2.name = T1.name GROUP BY T1.school ) T ORDER BY T.num DESC LIMIT 1

Database: retails
Question: What is the difference between the number of returned items and not returned items with the full price of under 16947.7?
Evidence: full price of under 16947.7 refers to l_extendedprice < 16947.7; returned item refers to l_returnflag = 'R'; not returned item refers to l_returnflag = 'A' OR l_returnflag = 'N'; difference = subtract(count(l_linenumber where l_returnflag = 'A' OR l_returnflag = 'N'), count(l_linenumber where l_returnflag = 'R')) where l_extendedprice < 16947.7
SQL: SELECT SUM(IIF(l_returnflag = 'A', 1, 0)) - SUM(IIF(l_returnflag = 'N', 1, 0)) AS diff FROM lineitem WHERE l_extendedprice < 16947.7

Database: image_and_language
Question: Based on image 5, what is the percentage of images that belong windows object class?
Evidence: DIVIDE(COUNT(OBJ_SAMPLE_ID where OBJ_CLASS = 'windows' and IMG_ID = 5), COUNT(OBJ_SAMPLE_ID where IMG_ID = 5)) as percentage;
SQL: SELECT CAST(COUNT(T1.OBJ_SAMPLE_ID) AS REAL) * 100 / COUNT(CASE WHEN T1.IMG_ID = 5 THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'windows'

Database: olympics
Question: Among the males, list the region name of people with height greater than 87% of the average height of all people listed.
Evidence: males refer to gender = 'M'; height greater than 87% of the average height refers to height > MULTIPLY(AVG(height), 0.87);
SQL: SELECT DISTINCT T1.region_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.gender = 'M' AND T3.height * 100 > ( SELECT AVG(height) FROM person WHERE gender = 'M' ) * 87

Database: sales_in_weather
Question: How many units are being sold for item 1 when the average temperature is 83?
Evidence: item 1 refers to item_nbr = 1; when the average temperature is 83 refers to tavg = 83
SQL: SELECT SUM(units) FROM weather AS T1 INNER JOIN sales_in_weather AS T2 ON T1.`date` = T2.`date` INNER JOIN relation AS T3 ON T2.store_nbr = T3.store_nbr WHERE T2.item_nbr = 1 AND T1.tavg = 83

Database: talkingdata
Question: What is the ratio of the number of app users that belong to the Securities category to the number of app users that belong to the Finance category?
Evidence: ratio = DIVIDE(SUM(category = 'Securities'), SUM(category = 'Finance'));
SQL: SELECT SUM(IIF(T2.category = 'Securities', 1, 0)) / SUM(IIF(T2.category = 'Finance', 1, 0)) AS per FROM app_labels AS T1 INNER JOIN label_categories AS T2 ON T1.label_id = T2.label_id