Database: university
Question: In 2014, what is the name of the university which was considered a leader in the publications rank?
Evidence: In 2014 refers to year = 2014; leader refers to MAX(score); in the publications rank refers to criteria_name = 'Publications Rank'; name of university refers to university_name;
SQL: SELECT T3.university_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T1.criteria_name = 'Publications Rank' AND T2.year = 2014 AND T1.id = 17 ORDER BY T2.score DESC LIMIT 1

Database: cookbook
Question: Identify recipes with different maximum and minimum quantities.
Evidence: maximum quantities refers to max_qty; minimum quantities refers to max_qty <> min_qty
SQL: SELECT T1.title FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.max_qty <> T2.min_qty

Database: app_store
Question: What are the apps that users pretty like this app and how many installs amount of these apps?
Evidence: users pretty much likes the app refers to Sentiment_Polarity = 'Positive';
SQL: SELECT DISTINCT T1.App, T1.Installs FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Sentiment_Polarity > 0

Database: car_retails
Question: What is the average actual profit by 1937 Lincoln Berline?
Evidence: average actual profit = AVG(SUBTRACT(priceEach, buyPrice)); 1937 Lincoln Berline is a product name;
SQL: SELECT SUM(T1.priceEach - T2.buyPrice) / COUNT(*) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode WHERE T2.productName = '1937 Lincoln Berline'

Database: donor
Question: What was the donation optional support amount for the project 'Armenian Genocide'?
Evidence: Armenian Genocide' is the title;
SQL: SELECT T2.donation_optional_support FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Armenian Genocide'

Database: public_review_platform
Question: What percentage of businesses are in the Real Estate sector and have the rating of 5 out of all businesses in Chandler?
Evidence: Real Estate sector refers to category_name = 'Real Estate'; rating of 5 refers to stars = 5; Chandler refers to city = 'Chandler'; percentage = MULTIPLY(DIVIDE(SUM(category_name = 'Real Estate' and stars = 5), COUNT(business_id)), 100);
SQL: SELECT CAST(SUM(CASE WHEN T1.stars = 5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.business_id) AS "percentage" FROM Business AS T1 INNER JOIN Business_Categories ON T1.business_id = Business_Categories.business_id INNER JOIN Categories AS T3 ON Business_Categories.category_id = T3.category_id WHERE T1.city LIKE 'Chandler' AND T3.category_name LIKE 'Real Estate'

Database: cars
Question: What is the price of the car ID 15?
SQL: SELECT T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.ID = 15

Database: address
Question: Provide the countries and the zip codes in the Virgin Islands.
Evidence: the Virgin Islands refer to state where name = 'Virgin Islands';
SQL: SELECT T2.county, T2.zip_code FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'Virgin Islands'

Database: cs_semester
Question: List the capability of research postgraduate students with an intellegence level of 4 and above.
Evidence: research postgraduate students refers to type = 'RPG'; intelligence level of 4 and above refers to intelligence > = 4;
SQL: SELECT T1.capability FROM RA AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id WHERE T2.type = 'RPG' AND T2.intelligence >= 4

Database: cookbook
Question: How many ingredients are there in the recipe that is best in helping your body's natural defence against illness and infection?
Evidence: best in helping your body's natural defence against illness and infection refers to MAX(vitamin_a);
SQL: SELECT COUNT(*) FROM Nutrition AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.vitamin_a > 0

Database: olympics
Question: In which city was the game held where the oldest competitor participated?
Evidence: in which city refers to city_name; the oldest refers to MAX(age);
SQL: SELECT T4.city_name FROM games_competitor AS T1 INNER JOIN games AS T2 ON T1.games_id = T2.id INNER JOIN games_city AS T3 ON T1.games_id = T3.games_id INNER JOIN city AS T4 ON T3.city_id = T4.id ORDER BY T1.age DESC LIMIT 1

Database: professional_basketball
Question: Among the teams that were ranked 3 from 1937 to 1940, what is the team name whose players had the highest point?
Evidence: from 1937 to 1940 refers to year between 1937 and 1940; player with highest point refers to Max(points)
SQL: SELECT DISTINCT T1.name FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.rank = 3 AND T1.year BETWEEN 1937 AND 1940 ORDER BY T2.points DESC LIMIT 1

Database: retails
Question: List line items shipped by truck with delivery time before 1997.
Evidence: line item refers to l_linenumber; shipped by truck refers to l_shipmode = 'truck'; delivery time before 1997 refers to year(l_shipdate) < 1997
SQL: SELECT l_linenumber FROM lineitem WHERE STRFTIME('%Y', l_shipdate) < 1997 AND l_shipmode = 'truck'

Database: student_loan
Question: Please check if student 124 is disabled male.
Evidence: if student name appear in disabled then student is disabled and vice versa; if student name appear in male then student is male and vice versa
SQL: SELECT IIF(T2.name IS NULL, 'female', 'male') FROM male AS T1 LEFT JOIN disabled AS T2 ON T1.name = T2.name WHERE T1.name = 'student124'

Database: codebase_comments
Question: What are the solution path of the tokenized name "matrix multiply"?
Evidence: solution path refers to Path; tokenized name refers to NameTokenized; NameTokenized = 'matrix multiply';
SQL: SELECT DISTINCT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized = 'matrix multiply'

Database: food_inspection_2
Question: List down the dba name of restaurants that were inspected due to license.
Evidence: inspected due to license refers to inspection_type = 'License'
SQL: SELECT T1.dba_name FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T2.inspection_type = 'License'

Database: books
Question: Among the books that were published by Scholastic, how many were written by J.K Rowling?
Evidence: "J.K Rowling" is the author_name; 'Scholastic' is the publisher_name
SQL: SELECT COUNT(*) FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id INNER JOIN book_author AS T3 ON T3.book_id = T1.book_id INNER JOIN author AS T4 ON T4.author_id = T3.author_id WHERE T2.publisher_name = 'Scholastic' AND T4.author_name = 'J.K. Rowling'

Database: food_inspection_2
Question: How many establishments that are doing business as Homemade Pizza have a risk level of 2?
Evidence: Homemade Pizza refers to dba_name = 'HOMEMADE PIZZA'; a risk level of 2 refers to risk_level = 2
SQL: SELECT COUNT(license_no) FROM establishment WHERE risk_level = 2 AND dba_name = 'HOMEMADE PIZZA'

Database: regional_sales
Question: What is the unit cost of order SO - 000103?
Evidence: OrderNumber = 'SO - 000103';
SQL: SELECT DISTINCT T FROM ( SELECT IIF(OrderNumber = 'SO - 000103', `Unit Cost`, NULL) AS T FROM `Sales Orders` ) WHERE T IS NOT NULL

Database: legislator
Question: What is the average number of terms for a current female legislator?
Evidence: female refers to gender_bio = 'F'; calculation refers to DIVIDE(COUNT(bioguide WHERE gender_bio = 'F'), COUNT(bioguide_id))
SQL: SELECT CAST(COUNT(T2.bioguide) AS REAL) / COUNT(DISTINCT T1.bioguide_id) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'F'