Database: law_episode
Question: What percentage of people have worked on the True North episode as additional crew?
Evidence: the True North episode refers to title = 'True North'; additional crew refers to role = 'Additional Crew'; percentage = divide(count(episode_id where role = 'Additional Crew'), count(episode_id)) * 100% where title = 'True North'
SQL: SELECT CAST(SUM(CASE WHEN T2.role = 'Additional Crew' THEN 1 ELSE 0 END) AS REAL ) * 100 / COUNT(T1.episode_id) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'True North'

Database: app_store
Question: List the top 5 lowest rated puzzle games and count the number of negative sentiments the games received.
Evidence: lowest rating refers to MIN(Rating); puzzle is the genre;
SQL: SELECT T1.App, COUNT(T1.App) COUNTNUMBER FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Sentiment = 'Negative' GROUP BY T1.App ORDER BY T1.Rating LIMIT 5

Database: olympics
Question: The Olympic competitor John Aalberg is from which region?
Evidence: from which region refers to region_name;
SQL: SELECT 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.full_name = 'John Aalberg'

Database: car_retails
Question: Which 5 products has the lowest amount of orders? List the product names.
Evidence: The lowest amount of orders refers to MIN(quantityOrdered);
SQL: SELECT t2.productName FROM orderdetails AS t1 INNER JOIN products AS t2 ON t1.productCode = t2.productCode GROUP BY t2.productName ORDER BY SUM(t1.quantityOrdered) ASC LIMIT 5

Database: synthea
Question: For how many times had Elly Koss have her Systolic Blood Pressure observed?
Evidence: Systolic Blood Pressure refers to DESCRIPTION = 'Systolic Blood Pressure';
SQL: SELECT COUNT(T2.description) FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.description = 'Systolic Blood Pressure'

Database: codebase_comments
Question: Please provide the solution id of the respository among the respository that receive 238 forks.
Evidence: solution id of the repository refers to solution.Id;
SQL: SELECT T2.Id FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Forks = 238

Database: retails
Question: For the order with the total price of 231499.38, what was the discounted price for supplier No. 9397?
Evidence: MULTIPLY(l_extendedprice, SUBTRACT(1, l_discount)) where o_totalprice = 231499.38 AND l_suppkey = 9397;
SQL: SELECT T1.l_extendedprice * (1 - T1.l_discount) AS DISCOUNTERPRICE FROM lineitem AS T1 INNER JOIN orders AS T2 ON T2.o_orderkey = T1.l_orderkey WHERE T1.l_suppkey = 9397 AND T2.o_totalprice = 231499.38

Database: student_loan
Question: For the students who have been absent from school for the longest time, how many months have they been absent?
Evidence: absent from school for the longest time refers to MAX(month)
SQL: SELECT MAX(month) FROM longest_absense_from_school

Database: talkingdata
Question: Calculate the average age of people who have apps installed but are not active on their devices.
Evidence: average age = AVG(age); installed refers to is_installed = 1; not active refers to is_active = 0;
SQL: SELECT AVG(T1.age) FROM gender_age AS T1 INNER JOIN events_relevant AS T2 ON T1.device_id = T2.device_id INNER JOIN app_events_relevant AS T3 ON T2.event_id = T3.event_id WHERE T3.is_installed = 1 AND T3.is_active = 0

Database: address
Question: What is the Asian population in the city with the alias Leeds?
SQL: SELECT SUM(T2.asian_population) FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.alias = 'Leeds'

Database: address
Question: Which residential area in Arecibo county has the highest average house value? Please give its zip_code.
Evidence: "ARECIBO" is the county; highest average house value refers to Max(avg_house_value)
SQL: SELECT T1.zip_code FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T2.county = 'ARECIBO' ORDER BY T1.avg_house_value DESC LIMIT 1

Database: airline
Question: What is the average departure delay time of flights operated by American Airlines Inc.?
Evidence: average departure delay time = DIVIDE(SUM(DEP_DELAY), COUNT(Code)); American Airlines Inc. refers to Description = 'American Airlines Inc.: AA';
SQL: SELECT AVG(T1.DEP_DELAY) FROM Airlines AS T1 INNER JOIN Airports AS T2 ON T2.Code = T1.ORIGIN INNER JOIN `Air Carriers` AS T3 ON T1.OP_CARRIER_AIRLINE_ID = T3.Code WHERE T3.Description = 'American Airlines Inc.: AA'

Database: public_review_platform
Question: Compare the number of business between the category of "Men's Clothing" and "Women's Clothing".
Evidence: category of "Men's Clothing" refers to category_name = 'Men''s Clothing'; "Women's Clothing" refers to category_name = 'Women''s Clothing'
SQL: SELECT SUM(CASE WHEN T1.category_name = 'Men''s Clothing' THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.category_name = 'Women''s Clothing' THEN 1 ELSE 0 END) AS diff FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id

Database: public_review_platform
Question: What kind of "wi-fi" does Yelp business No."10172" have?
Evidence: kind of wi-fi refers to attribute_value where attribute_name = 'Wi-Fi'; business No. refers to business_id;
SQL: SELECT T2.attribute_value FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T2.business_id = 10172 AND T1.attribute_name LIKE 'wi-fi'

Database: student_loan
Question: What is the average absence period of a student?
Evidence: average refers to DIVIDE(SUM(month), COUNT(name))
SQL: SELECT AVG(month) FROM longest_absense_from_school

Database: retail_world
Question: Calculate the total number of orders placed by the company 'GROSELLA-Restaurante'.
Evidence: 'GROSELLA-Restaurante' refers to CompanyName;
SQL: SELECT COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.CompanyName = 'GROSELLA-Restaurante'

Database: movie_3
Question: What is the total amount paid for rentals made on July 29, 2005?
Evidence: July 29, 2005 refers to rental_date like '2005-07-29'
SQL: SELECT SUM(T2.amount) FROM rental AS T1 INNER JOIN payment AS T2 ON T1.rental_id = T2.rental_id WHERE date(T1.rental_date) = '2005-07-29%'

Database: regional_sales
Question: Compare the number of orders between "Platters" and "Serveware" products.
Evidence: COUNT(OrderNumber where Product Name = 'Platters') > COUNT(OrderNumber where Product Name = 'Serveware');
SQL: SELECT SUM(CASE WHEN T2.`Product Name` = 'Platters' THEN 1 ELSE 0 END) AS num1 , SUM(CASE WHEN T2.`Product Name` = 'Serveware' THEN 1 ELSE 0 END) AS num2 FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID

Database: app_store
Question: What is the lowest sentiment polarity score of the Basketball Stars app for people who dislikes the app pretty much and how many downloads does it have?
Evidence: lowest sentiment polarity score refers to MIN(Sentiment_Polarity); user dislike the app pretty much refers to Sentiment_Polarity<-0.5; number of downloads it has refers to installs;
SQL: SELECT MIN(T2.Sentiment_Polarity), T1.Installs FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Basketball Stars'

Database: image_and_language
Question: How many images have an x-coordinate of 5 and y-coordinate of 5?
Evidence: X and Y refer to coordinates of the bounding box where X = 5 and Y = 5; images refer to IMG_ID;
SQL: SELECT COUNT(IMG_ID) FROM IMG_OBJ WHERE X = 5 AND Y = 5