Database: olympics
Question: Which region is the majority of the athletes from?
Evidence: region refers to region_name; the majority of the athletes from refer to MAX(COUNT(region_name));
SQL: SELECT T2.region_name FROM person_region AS T1 INNER JOIN noc_region AS T2 ON T1.region_id = T2.id GROUP BY T2.region_name ORDER BY COUNT(T1.person_id) DESC LIMIT 1

Database: retail_world
Question: Please list the IDs of the orders with a product whose production is not continuous.
Evidence: IDs of the orders refers to OrderID; production is not continuous refers to Discontinued = 1;
SQL: SELECT T2.OrderID FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Discontinued = 1

Database: public_review_platform
Question: What is the average rating for the all Yelp businesses that open 24 hours?
Evidence: open 24 hours refers to attribute_name = 'Open 24 Hours' AND attribute_value = 'true'; rating refers to stars; average rating = AVG(stars);
SQL: SELECT CAST(SUM(T3.stars) AS REAL) / COUNT(T2.business_id) AS "avg" FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T1.attribute_name LIKE 'Open 24 Hours' AND T2.attribute_value LIKE 'TRUE'

Database: public_review_platform
Question: Among the active businesses in Ahwatukee, which of them are still open in Sunday?
Evidence: active business refers to active = 'true'; 'Ahwatukee' is the name of city; open in Sunday refers to day_of_week = 'Sunday'
SQL: SELECT T1.business_id 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.city LIKE 'Ahwatukee' AND T1.active LIKE 'TRUE' AND T3.day_of_week LIKE 'Sunday'

Database: cars
Question: Which is the most fuel efficient car in 1975?
Evidence: car's name refers to car_name; the most fuel efficient refers to max(mpg); in 1975 refers to model_year = 1975
SQL: SELECT T1.car_name FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T2.model_year = '1975' ORDER BY T1.mpg DESC LIMIT 1

Database: legislator
Question: Which historical legislators are members of the National Greenbacker party? Write their first and last names.
Evidence: members of the National Greenbacker party refers to party = 'National Greenbacker'; first and last names refers to first_name, last_name
SQL: SELECT T2.first_name, T2.last_name FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.party = 'National Greenbacker'

Database: retail_world
Question: How many territories are there in the Eastern region?
Evidence: "Eastern" is the RegionDescription
SQL: SELECT COUNT(T1.RegionID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Eastern'

Database: retails
Question: How many products shipped on 19/11/1994 were ordered on 21/09/1994?
Evidence: shipped on 19/11/1994 refers to l_shipdate = '1994-11-19'; ordered on 21/09/1994 refers to o_orderdate = '1994-09-21'
SQL: SELECT COUNT(T2.l_partkey) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_orderdate = '1994-09-21' AND T2.l_shipdate = '1994-11-19'

Database: sales
Question: Find and list the products that sold below the average quantity.
Evidence: below the average quantity refers to Quantity < AVG(Quantity);
SQL: SELECT DISTINCT T2.Name FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Quantity < ( SELECT AVG(Quantity) FROM Sales )

Database: public_review_platform
Question: Please list the business ID of the Yelp_Business with the highest Elitestar rating under the category "Food".
Evidence: under the category "Food" refers to category_name = 'Food'
SQL: SELECT T2.business_id FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T1.category_name LIKE 'Food' ORDER BY T3.stars DESC LIMIT 1

Database: olympics
Question: What is the name of the competitor who has won the most medals?
Evidence: name of the competitor refers to full_name; won the most medals refer to MAX(COUNT(medal_id));
SQL: SELECT T1.full_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN competitor_event AS T3 ON T2.id = T3.competitor_id INNER JOIN medal AS T4 ON T3.medal_id = T4.id WHERE T4.id != 4 GROUP BY T1.full_name ORDER BY COUNT(T4.id) DESC LIMIT 1

Database: public_review_platform
Question: List down the business ID and user ID who got uber for cool votes.
Evidence: got uber for cool votes refers to review_votes_cool = 'Uber'
SQL: SELECT business_id, user_id FROM Reviews WHERE review_votes_cool = 'Uber'

Database: world
Question: Calculate the percentage of the surface area of all countries that uses Chinese as one of their languages.
Evidence: percentage = DIVIDE(MULTIPLY(SUM(SurfaceArea WHERE Language = 'Chinese'), SUM(SurfaceArea)), 1.0); Chinese as one of the languages refers to Language = 'Chinese';
SQL: SELECT CAST(SUM(IIF(T2.Language = 'Chinese', T1.SurfaceArea, 0)) AS REAL) * 100 / SUM(T1.SurfaceArea) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode

Database: computer_student
Question: How many basic and medium undergraduate courses are there?
Evidence: basic and medium undergraduate courses refers to courseLevel = 'Level_300' and courses refers to course.course_id
SQL: SELECT COUNT(*) FROM course WHERE courseLevel = 'Level_300'

Database: cs_semester
Question: What is the credit of the course named "Computer Vision"?
SQL: SELECT credit FROM course WHERE name = 'Computer Vision'

Database: beer_factory
Question: Which brand of root beer has the lowest unit profit available to wholesalers? Indicate the ID of the customer that has the highest number of purchases of the said brand.
Evidence: brand of root beer refers to BrandName; lowest unit profit available to wholesalers refers to MIN(SUBTRACT(CurrentRetailPrice, WholesaleCost)); ID of the customer refers to CustomerID; highest number of purchases refers to MAX(COUNT(CustomerID));
SQL: SELECT T3.BrandName, T2.CustomerID FROM rootbeer AS T1 INNER JOIN `transaction` AS T2 ON T1.RootBeerID = T2.RootBeerID INNER JOIN rootbeerbrand AS T3 ON T1.BrandID = T3.BrandID GROUP BY T3.BrandID ORDER BY T3.CurrentRetailPrice - T3.WholesaleCost, COUNT(T1.BrandID) DESC LIMIT 1

Database: retail_complains
Question: How many clients under the age of 35 gave Eagle National Mortgage 1 star?
Evidence: age < 35; Eagle National Mortgage refers to Product = 'Eagle National Mortgage';
SQL: SELECT COUNT(T2.age) FROM reviews AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T1.Product = 'Eagle National Mortgage' AND T1.Stars = 1 AND T2.age < 35

Database: ice_hockey_draft
Question: List the names of all players from Avangard Omsk who played in the 2000-2001 season of the International league that have no goals in draft year.
Evidence: names of the players refers to PlayerName; Avangard Omsk refers to TEAM = 'Avangard Omsk'; International league refers to LEAGUE = 'International'; no goals in draft year refers to G = 0; 2000-2001 season refers to SEASON = '2000-2001';
SQL: SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2000-2001' AND T1.LEAGUE = 'International' AND T1.TEAM = 'Czech Republic (all)' AND T1.G = 0

Database: trains
Question: How many wheels do the long cars have?
Evidence: long cars refers to len = 'long'
SQL: SELECT SUM(wheels) FROM cars WHERE len = 'long'