Database: public_review_platform
Question: Find the 5-star business in Ahwatukee, AZ and identify it's business category.
Evidence: 5-star refers to stars = 5; in Ahwatukee refers to city = 'Ahwatukee'; business category refers to category_name
SQL: SELECT T1.business_id, T3.category_name FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T1.city = 'Ahwatukee' AND T1.stars = 5

Database: college_completion
Question: What's the number of male Hispanic students who graduated from Central Alabama Community College in 2011 within 100 percent of normal/expected time?
Evidence: male refers to gender = 'M'; Hispanic students refers to race = 'H'; Central Alabama Community College refers to chronname = 'Central Alabama Community College'; in 2011 refers to year = 2011; number of students who graduated within 100 percent of normal/expected time refers to grad_100;
SQL: SELECT SUM(T2.grad_100) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T1.chronname = 'Central Alabama Community College' AND T2.year = 2011 AND T2.gender = 'M' AND T2.race = 'H'

Database: coinmarketcap
Question: How much dollars was a Bitcoin worth on 2013/4/28 according to the coin market?
Evidence: worth refers to price; on 2013/4/28 refers to date = '2013-04-28'
SQL: SELECT T2.market_cap FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2013-04-28' AND T1.name = 'Bitcoin'

Database: music_platform_2
Question: List the urls for all the "fiction-science-fiction" podcasts.
Evidence: fiction-science-fiction podcasts refers to category = 'fiction-science-fiction'; urls refers to itunes_url
SQL: SELECT itunes_url FROM podcasts WHERE podcast_id IN ( SELECT podcast_id FROM categories WHERE category = 'fiction-science-fiction' )

Database: citeseer
Question: Which paper ID cited the most word? In which class label does it belongs to?
Evidence: most cited word refers to max(word_cited_id);
SQL: SELECT T1.paper_id, T1.class_label FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id GROUP BY T1.paper_id, T1.class_label ORDER BY COUNT(T2.word_cited_id) DESC LIMIT 1

Database: regional_sales
Question: What were the total orders of Medsep Group from 2018 to 2020?
Evidence: Medsep Group is the name of the customer; total orders refer to COUNT(OrderNumber); from 2018 to 2020 refers to SUBSTR(OrderDate, -2) IN ('18', '19', '20');
SQL: SELECT SUM(CASE WHEN SUBSTR(T1.OrderDate, -2) IN ('18', '19', '20') AND T2.`Customer Names` = 'Medsep Group' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID

Database: app_store
Question: What is the percentage of application with 4.7 rating having more positives sentiment than negative sentiment?
Evidence: percentage = DIVIDE(SUBTRACT(SUM(Sentiment = 'Positive')), (SUM(Sentiment = 'Negative')), SUM(Sentiment = 'Negative')) as percentage; having more positive sentiment than negative sentiment refers to Sentiment = 'Positive'>Sentiment = 'Negative';
SQL: SELECT CAST(COUNT(CASE WHEN ( SELECT COUNT(CASE WHEN Sentiment = 'Positive' THEN 1 ELSE NULL END) - COUNT(CASE WHEN Sentiment = 'Negative' THEN 1 ELSE NULL END) FROM user_reviews GROUP BY App ) > 0 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.Sentiment) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Rating = 4.7

Database: cs_semester
Question: Calculate the average satisfaction of the good students with their courses.
Evidence: average satisfaction = DIVIDE(SUM(sat), COUNT(course_id)); satisfaction refers to sat; good student refers to grade = 'B';
SQL: SELECT CAST(SUM(sat) AS REAL) / COUNT(course_id) FROM registration WHERE grade = 'B'

Database: retail_world
Question: How many products were ordered in the order with the highest freight?
Evidence: highest freight refers to max(Freight)
SQL: SELECT COUNT(T2.ProductID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID GROUP BY T2.ProductID ORDER BY COUNT(T1.Freight) DESC LIMIT 1

Database: legislator
Question: What is the party of the oldest legislator?
Evidence: oldest legislator refers to MIN(birthday_bio);
SQL: SELECT T1.party FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide ORDER BY T2.birthday_bio LIMIT 1

Database: superstore
Question: Calculate the total profit by Cisco SPA301 for all regions.
Evidence: Cisco SPA301' is the "Product Name"; all regions refers to central_superstore, south_superstore, west_superstore, east_superstore
SQL: SELECT SUM(T1.Profit) + SUM(T2.Profit) + SUM(T3.Profit) + SUM(T4.Profit) AS totalProfit FROM west_superstore AS T1 INNER JOIN east_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN central_superstore AS T3 ON T3.`Customer ID` = T2.`Customer ID` INNER JOIN south_superstore AS T4 ON T4.`Customer ID` = T3.`Customer ID` INNER JOIN product AS T5 ON T5.`Product ID` = T4.`Product ID` WHERE T5.`Product Name` = 'Cisco SPA301'

Database: airline
Question: For the flight from ATL to PHL on 2018/8/1 that scheduled local departure time as "2040", which air carrier does this flight belong to?
Evidence: flight from ATL refers to ORIGIN = 'ATL'; flight to PHL refers to DEST = 'PHL'; on 2018/8/1 refers to FL_DATE = '2018/8/1'; local departure time refers to CRS_DEP_TIME; CRS_DEP_TIME = '2040';
SQL: SELECT T2.Description FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T1.FL_DATE = '2018/8/1' AND T1.ORIGIN = 'ATL' AND T1.DEST = 'PHL' AND T1.CRS_DEP_TIME = '2040' GROUP BY T2.Description

Database: retails
Question: Among the customers with an account balance lower than 4000, what is the percentage of the customers in the US?
Evidence: DIVIDE(COUNT(c_custkey where n_name = 'United States' and c_acctbal < 4000), COUNT(c_custkey where c_acctbal < 4000)) as percentage;
SQL: SELECT CAST(SUM(IIF(T2.n_name = 'United States', 1, 0)) AS REAL) * 100 / COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_acctbal < 4000

Database: disney
Question: Name the main character of Disney's most popular adventure movie based on its inflation-adjusted gross.
Evidence: adventure movie refers to genre = 'Adventure'; the main character of the movie refers to hero; most popular movie based on its inflation-adjusted gross refers to where MAX(inflation_adjusted_gross);
SQL: SELECT T2.hero FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title WHERE T1.genre = 'Adventure' ORDER BY CAST(REPLACE(trim(T1.inflation_adjusted_gross, '$'), ',', '') AS REAL) DESC LIMIT 1

Database: food_inspection
Question: Among the businesses within the postal code 94117, what is total number of businesses with a high risk category?
Evidence: businesses with a high risk category refer to business_id where risk_category = 'High Risk';
SQL: SELECT COUNT(DISTINCT T2.business_id) FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.postal_code = 94117 AND T1.risk_category = 'High Risk'

Database: movies_4
Question: List the film with the highest budget in each genre.
Evidence: highest budget refers to max(budget); each genre refers to genre_name; film also means movie; list the film refers to title of movie
SQL: SELECT T3.genre_name, MAX(T1.budget) FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id GROUP BY T3.genre_name