Database: regional_sales
Question: Among the sales team in South region, write down the numbers of orders made by the sales team ID of one digit.
Evidence: sales team ID of one digit refers to _SalesTeamID BETWEEN 1 AND 9; numbers of orders refer to COUNT(OrderNumber);
SQL: SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T2.Region = 'South' AND T2.SalesTeamID BETWEEN 1 AND 9 GROUP BY T2.SalesTeamID HAVING COUNT(T1.OrderNumber)

Database: public_review_platform
Question: List the closing time and day of week of active businesses in Goodyear with stars greater than the 80% of average age of star rating.
Evidence: active business ID refers to active = 'true'; Goodyear is a city; Calculation = AVG(stars) * 0.8; businesses with stars greater than 80% of average star rating refers to stars > AVG(stars) * 0.8
SQL: SELECT DISTINCT T2.closing_time, T3.day_of_week FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T1.active = 'true' AND T1.city = 'Goodyear' AND T1.stars > ( SELECT AVG(stars) * 0.8 FROM Business WHERE active = 'true' AND city = 'Goodyear' )

Database: authors
Question: Under the conference name of MICRO, calculate how many more paper is needed to published in 1971 to 1980 in average by yearly to get equivalent to the number of paper from 1991 to 2000. Write down the title and author name of the paper that were actually published during 1971 to 1980 with the conference name with MICRO.
Evidence: "MICRO" is the ShortName of conference; in 1971 to 1980 refers to Year BETWEEN '1971' AND '1980'; in 1991 to 2000 refers to Year BETWEEN '1991' AND '2000': Average needed paper = Subtract (Count(PaperId(Year BETWEEN '1991' AND '2000')), Count(PaperId(Year BETWEEN '1971' AND '1980')))/10
SQL: SELECT T2.title, T3.name, T1.FullName FROM Conference AS T1 INNER JOIN Paper AS T2 ON T1.id = T2.ConferenceId INNER JOIN PaperAuthor AS T3 ON T1.id = T3.PaperId WHERE T1.ShortName = 'MICRO' AND T2.Year BETWEEN '1971' AND '1980'

Database: sales
Question: What is the average price of products that cost between 100 and 200?
Evidence: average price = DIVIDE(SUM(Price, COUNT(Price))); cost refers to Price; Price BETWEEN 100 AND 200;
SQL: SELECT AVG(Price) FROM Products WHERE Price BETWEEN 100 AND 200

Database: language_corpus
Question: Please list the title of the pages on which the word "grec" occurred for over 20 times.
Evidence: occurred for over 20 times refers to occurrences > 20;
SQL: SELECT T3.title 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 = 'grec' AND T2.occurrences > 20

Database: regional_sales
Question: Which sales team has the other with the highest unit price?
Evidence: highest unit price refers to Max(Unit Price)
SQL: SELECT T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE REPLACE(T1.`Unit Price`, ',', '') = ( SELECT REPLACE(T1.`Unit Price`, ',', '') FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID ORDER BY REPLACE(T1.`Unit Price`, ',', '') DESC LIMIT 1 ) ORDER BY REPLACE(T1.`Unit Price`, ',', '') DESC LIMIT 1

Database: law_episode
Question: What is the title of the episodes that were least enjoyed?
Evidence: least enjoyed refers to stars = 1
SQL: SELECT T1.title FROM Episode AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id WHERE T2.stars = 1

Database: movies_4
Question: Who is the main actor in the "Pirates of the Caribbean: At World's End" movie?
Evidence: main actor refers to person_name where Min(cast_order); "Pirates of the Caribbean: At World's End" refers to title = 'Pirates of the Caribbean: At World''s End'
SQL: SELECT T3.person_name 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 T1.title LIKE 'Pirates of the Caribbean: At World%s End' ORDER BY T2.cast_order LIMIT 1

Database: public_review_platform
Question: Find the percentage of 5 stars rated business.
Evidence: percentage refers to DIVIDE(COUNT(stars = 5), COUNT(business_id)) * 100%
SQL: SELECT CAST(SUM(CASE WHEN stars = 5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(stars) FROM Business

Database: world_development_indicators
Question: Which country have completed vital registration? List all the countries.
Evidence: have completed vital registration refers to VitalRegistrationComplete = Yes; country name refers to ShortName
SQL: SELECT ShortName FROM Country WHERE VitalRegistrationComplete = 'Yes'

Database: citeseer
Question: What is the most cited word? How many papers was that word cited in?
Evidence: most cited word refers to max(count(word_cited_id);
SQL: SELECT word_cited_id, COUNT(paper_id) FROM content GROUP BY word_cited_id ORDER BY COUNT(word_cited_id) DESC LIMIT 1

Database: simpson_episodes
Question: Please list the name of crew that were born before 1970.
Evidence: born before 1970 refers to birthdate < '1970-01-01'
SQL: SELECT name FROM Person WHERE SUBSTR(birthdate, 1, 4) < '1970';

Database: olympics
Question: What is the average age of Argentina's athletes who participated in the Summer Olympics in 2012?
Evidence: AVG(age) where games_name = '2012 Summer' and region_name = 'Argentina';
SQL: SELECT AVG(T2.age) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person_region AS T3 ON T2.person_id = T3.person_id INNER JOIN noc_region AS T4 ON T3.region_id = T4.id WHERE T1.games_name = '2012 Summer' AND T4.region_name = 'Argentina'

Database: image_and_language
Question: How many white objects are there in image no.2347915?
Evidence: white objects refers to ATT_CLASS = 'white'; image no.2347915 refers to IMG_ID = 2347915
SQL: SELECT SUM(CASE WHEN T2.ATT_CLASS = 'white' THEN 1 ELSE 0 END) FROM IMG_OBJ_ATT AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.IMG_ID = 2347915

Database: legislator
Question: Give the religion of the legislator with RSS url of http://www.corker.senate.gov/public/index.cfm/rss/feed.
Evidence: religion refers to religion_bio;
SQL: SELECT T1.religion_bio FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.rss_url = 'http://www.corker.senate.gov/public/index.cfm/rss/feed' GROUP BY T1.religion_bio

Database: soccer_2016
Question: How many matches did the Sunrisers Hyderabad team win in 2013?
Evidence: Sunrisers Hyderabad team refers to Team_Name = 'Sunrisers Hyderabad'; in 2013 refers to Match_Date like '2013%';
SQL: SELECT SUM(CASE WHEN Match_Date LIKE '2013%' THEN 1 ELSE 0 END) FROM `Match` AS T1 INNER JOIN Team AS T2 ON T1.Match_Winner = T2.Team_Id WHERE T2.Team_Name = 'Sunrisers Hyderabad'

Database: video_games
Question: List all the platform games.
Evidence: platform game refers to genre_name = 'Platform'; game refers to game_name
SQL: SELECT T2.game_name FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id WHERE T1.genre_name = 'Platform'

Database: coinmarketcap
Question: Name the coins that were not opened on May 2013.
Evidence: not opened refers to open IS NULL; on May 2013 refers to year(date) = 2019 AND month(date) = 5
SQL: SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE STRFTIME('%Y-%m', T2.date) = '2013-05' AND T2.open IS NULL

Database: synthea
Question: List down the first name of patients who have cystitis condition.
Evidence: cystitis refers to conditions where DESCRIPTION = 'Cystitis';
SQL: SELECT DISTINCT T1.first FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Cystitis'