Database: public_review_platform
Question: What is the percentage of businesses with "Good for Kids" attribute over the other attributes?
Evidence: "Good for Kids" attribute refers to attribute_name = 'Good for Kids' AND attribute_value = 'true'; Calculation = DIVIDE(SUM(attribute_name = 'Good for Kids' AND attribute_value = 'true')), SUM(business_id) * 100
SQL: SELECT CAST(SUM(CASE WHEN attribute_name = 'Good for Kids' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.business_id) FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T2.attribute_value = 'true'

Database: public_review_platform
Question: What is the closing and opening time of businesses located at Glendale with highest star rating?
Evidence: Glendale is a city; the highest star rating refers to MAX(stars)
SQL: SELECT T2.opening_time, T2.closing_time FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Glendale' ORDER BY T1.stars DESC LIMIT 1

Database: codebase_comments
Question: How many methods in repository 150 did not have a comment and a summary?
Evidence: methods refers to Name; repository that did not have a comment and a summary refers to FullComment IS NULL AND Summary IS NULL;
SQL: SELECT COUNT(T2.SolutionId) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.RepoId = 150 AND T2.FullComment IS NULL AND T2.Summary IS NULL

Database: shipping
Question: Please list the IDs of all the shipments made by a retailer customer.
Evidence: "retailer" is the cust_type;  IDs of shipments refers to ship_id
SQL: SELECT T2.ship_id FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.cust_type = 'retailer'

Database: sales
Question: What is the full name of the customer who purchased the highest amount of total price in a single purchase?
Evidence: full name of the customer = FirstName, MiddleInitial, LastName; highest amount of total price refers to MAX(MULTIPLY(Quantity, Price));
SQL: SELECT T2.FirstName, T2.MiddleInitial, T2.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Products AS T3 ON T1.ProductID = T3.ProductID GROUP BY T1.SalesID, T1.Quantity, T3.Price, FirstName, MiddleInitial, LastName ORDER BY T1.Quantity * T3.Price DESC LIMIT 1

Database: car_retails
Question: For the product No. S18_3482 in the Order No.10108, how much discount did the customer have?
Evidence: DIVIDE(SUBTRACT(MSRP, priceEach)), MSRP); product No. S18_3482 refers to productCode = 'S18_3482'
SQL: SELECT (t1.MSRP - t2.priceEach) / t1.MSRP FROM products AS t1 INNER JOIN orderdetails AS t2 ON t1.productCode = t2.productCode WHERE t1.productCode = 'S18_3482' AND t2.orderNumber = '10108'

Database: food_inspection
Question: Describe the violation dates, risk categories, descriptions and names of the eateries under Jade Chocolates LLC.
Evidence: eateries under Jade Chocolates LLC refer to business_id where owner_name = 'Jade Chocolates LLC';
SQL: SELECT T1.`date`, T1.risk_category, T1.description, T2.name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.owner_name = 'Jade Chocolates LLC'

Database: codebase_comments
Question: What is the comment format of method number 50 with the solution path "managedfusion_managedfusion\ManagedFusion.sln"?
Evidence: comment format refers to CommentIsXml; method number refers to Method_100k.Id; Method_100k.Id = 50; solution path refers to Path; Path = 'managedfusion_managedfusion\ManagedFusion.sln';
SQL: SELECT CASE WHEN T2.CommentIsXml = 0 THEN 'isNotXMLFormat' WHEN T2.CommentIsXml = 1 THEN 'isXMLFormat' END format FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Id = 50 AND T1.Path = 'managedfusion_managedfusionManagedFusion.sln'

Database: synthea
Question: Among observations in 2011, provide the names and ages of patients whose Systolic Blood Pressures are 200mmHg.
Evidence: name implies the patient's full name which refers to first, last; age refers to deathdate is null then SUBTRACT(strftime('%Y', DATE), strftime('%Y', birthdate)); Systolic Blood Pressures are 200mmHg refers to DESCRIPTION = 'Systolic Blood Pressure' and VALUE = 200 and UNITS = 'mmHg' from observations; in 2011 refers to DATE like '2011%';
SQL: SELECT T2.first, T2.last , CASE WHEN T2.deathdate IS NULL THEN strftime('%Y', T1.DATE) - strftime('%Y', T2.birthdate) ELSE strftime('%Y', T2.deathdate) - strftime('%Y', T2.birthdate) END AS age FROM observations AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Systolic Blood Pressure' AND T1.VALUE = 200 AND T1.UNITS = 'mmHg' AND strftime('%Y', T1.DATE) = '2011'

Database: talkingdata
Question: How many OPPO users participated in events which were held around 12 AM on 1st May,2016?
Evidence: OPPO refers to phone_brand = 'OPPO'; around 12 AM on 1st May, 2016 refers to timestamp is '2016-05-01'
SQL: SELECT COUNT(T1.device_id) FROM events AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'OPPO' AND STRFTIME('%Y-%m-%d', T1.`timestamp`) = '2016-05-01'

Database: world_development_indicators
Question: List out the series code of countries using Euro as their currency unit.
SQL: SELECT DISTINCT T2.SeriesCode FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.CurrencyUnit = 'Euro'

Database: airline
Question: What are the codes of the airport found in Ankara, Turkey?
Evidence: airport found in Ankara, Turkey refers to Description like '%Ankara, Turkey%';
SQL: SELECT Code FROM Airports WHERE Description LIKE '%Ankara, Turkey%'

Database: chicago_crime
Question: Between Deering and Near West districts, which district reported the most number of crime incidents that happened in a library?
Evidence: "Deering" and "Near West" are both district_name; 'LIBRARY' is the location_description; district with the most number of crime Max(Count(district_no))
SQL: SELECT T1.district_name FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no WHERE T1.district_name IN ('Deering', 'Near West') AND T2.location_description = 'LIBRARY' GROUP BY T1.district_name ORDER BY COUNT(T2.district_no) DESC LIMIT 1

Database: soccer_2016
Question: What is the average number of extra runs made as noballs?
Evidence: noballs refers to Extra_Name = 'noballs' ; average number = divide(sum(Extra_Runs), count(Extra_Runs))
SQL: SELECT AVG(T1.Extra_Runs) FROM Extra_Runs AS T1 INNER JOIN Extra_Type AS T2 ON T1.Extra_Type_Id = T2.Extra_Id WHERE T2.Extra_Name = 'noballs'

Database: professional_basketball
Question: Percentage of games lost out of total games played by the Houston Mavericks
Evidence: Houston Mavericks refers to name = 'Houston Mavericks'; percentage = divide(sum(lost), sum(games)) * 100%
SQL: SELECT CAST(SUM(lost) AS REAL) * 100 / SUM(games) FROM teams WHERE name = 'Houston Mavericks'

Database: soccer_2016
Question: List the players' names who were born in 1971.
Evidence: players' name refers to Player_name; born in 1971 refers to DOB LIKE '1971%'
SQL: SELECT Player_name FROM Player WHERE DOB LIKE '1971%'

Database: shipping
Question: State the weight of shipments transported by Peterbilt.
Evidence: "Peterbilt" is the make
SQL: SELECT T2.weight FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE make = 'Peterbilt'

Database: chicago_crime
Question: How many crimes were Misc Non-Index Offense?
Evidence: Misc Non-Index Offense refers to title = 'Misc Non-Index Offense'
SQL: SELECT SUM(CASE WHEN T1.title = 'Misc Non-Index Offense' THEN 1 ELSE 0 END) FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T2.fbi_code_no = T1.fbi_code_no