Database: talkingdata
Question: How many models does the VIVO phone brand released?
Evidence: models refers to device_model;
SQL: SELECT COUNT(device_id) FROM phone_brand_device_model2 WHERE phone_brand = 'vivo'

Database: retail_world
Question: What is the difference in salary of the top 2 employees with the highest number of territories in charge?
Evidence: highest number of territories refers to max(TerritoryID); difference in salary = subtract(employeeA.Salary, employeeB.Salary)
SQL: SELECT MAX(Salary) - MIN(Salary) FROM ( SELECT T1.Salary FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T1.EmployeeID, T1.Salary ORDER BY COUNT(T2.TerritoryID) DESC LIMIT 2 ) T1

Database: cookbook
Question: How many ingredients are needed to prepare Idaho Potato Supreme?
Evidence: Idaho Potato Supreme refers to title
SQL: SELECT COUNT(*) FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Idaho Potato Supreme'

Database: movie_3
Question: Among the customers who have rented the film ACADEMY DINOSAUR, how many of them are active?
Evidence: "ACADEMY DINOSAUR" is the title of film; customer refers to customer_id; active refers to active = 1
SQL: SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T1.active = 1 AND T4.title = 'ACADEMY DINOSAUR'

Database: disney
Question: Describe the voice actors and villains in Cinderella.
Evidence: Cinderella refers to movie_title = ' Cinderella';
SQL: SELECT T1.`voice-actor`, T2.villian FROM `voice-actors` AS T1 INNER JOIN characters AS T2 ON T1.movie = T2.movie_title WHERE T2.movie_title = 'Cinderella'

Database: menu
Question: What is the page count for menu with page ID of 130?
Evidence: page ID of 130 refers MenuPage.id = 130;
SQL: SELECT T1.page_count FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T2.id = 130

Database: olympics
Question: How many athletes in the database are from Guatemala?
Evidence: from Guatemala refers to region_name = 'Guatemala';
SQL: SELECT COUNT(T1.person_id) FROM person_region AS T1 INNER JOIN noc_region AS T2 ON T1.region_id = T2.id WHERE T2.region_name = 'Guatemala'

Database: cars
Question: How many cars in the database are originated from Europe?
Evidence: originated from Europe refers to country = 'Europe'
SQL: SELECT COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T2.country = 'Europe'

Database: synthea
Question: What is the start date of the care plan of the patient whose maiden name is Adams?
Evidence: start date of the care plan refers to careplans.START;
SQL: SELECT DISTINCT T1.START FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.maiden = 'Adams'

Database: superstore
Question: Who ordered the order ID CA-2011-118976 from the East region?
Evidence: Who refers to "Customer Name"
SQL: SELECT DISTINCT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Order ID` = 'CA-2011-118976' AND T2.Region = 'East'

Database: airline
Question: What is the air carrier's description of the cancelled flights?
Evidence: cancelled flights refers to CANCELLED = 1;
SQL: SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.CANCELLED = 1 GROUP BY T1.Description

Database: professional_basketball
Question: How old was Alexis Ajinca when he was first drafted?
Evidence: age when drafted refers to Subtract(draftYear, year(birthDate)); first drafted refers to draftYear
SQL: SELECT draftYear - strftime('%Y', birthDate) FROM draft AS T1 INNER JOIN players AS T2 ON T1.playerID = T2.playerID WHERE T1.firstName = 'Alexis' AND T1.lastName = 'Ajinca' AND draftRound = 1

Database: restaurant
Question: What percentage of restaurants are from the Bay Area?
Evidence: Bay Area refers to region = 'bay area'; percentage = divide(count(id_restaurant where region = 'bay area'), count(id_restaurant)) * 100%
SQL: SELECT CAST(SUM(IIF(T1.region = 'bay area', 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city

Database: sales_in_weather
Question: What is the ratio of the highest and lowest temperature in store 11?
Evidence: store 11 refers to store_nbr = 11; highest temperature refers to Max(tmax); lowest temperature refers to Min(tmin); ration = Divide (Max(tmax), Min(tmin))
SQL: SELECT CAST((MAX(T1.tmax) - MIN(T1.tmin)) AS REAL) / MIN(T1.tmin) FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 11

Database: professional_basketball
Question: Of the players drafted in NBA between 1990 and 2000, who has the most points in all-star? List the player's first name and last name.
Evidence: NBA refers to lgID = 'NBA'; between 1990 and 2000 refers to year between 1990 and 2000; the most points refers to max(points)
SQL: SELECT T3.firstname, T3.lastname FROM player_allstar AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID INNER JOIN draft AS T3 ON T1.playerID = T3.playerID WHERE T2.year BETWEEN 1990 AND 2000 ORDER BY T1.points DESC LIMIT 1

Database: regional_sales
Question: How many Borough-type stores located in the city of Brooklyn have a population of less than 3 million?
Evidence: "Brooklyn" is the CityName; population of less than 3 million refers to Population < 3000000
SQL: SELECT SUM(CASE WHEN Population < 3000000 AND Type = 'Borough' AND `City Name` = 'Brooklyn' THEN 1 ELSE 0 END) FROM `Store Locations`

Database: disney
Question: Who are the voice actors in the movie that came out on 11/24/2010?
Evidence: Came out on 11/24/2010 refers to release_date = 'Nov 24, 2010';
SQL: SELECT T2.`voice-actor` FROM movies_total_gross AS T1 INNER JOIN `voice-actors` AS T2 ON T1.movie_title = T2.movie WHERE T1.release_date = 'Nov 24, 2010'

Database: world_development_indicators
Question: What is the topic of the series when the Total reserves minus gold (current US$) indicator of Haiti hit the value of 3,000,000 in 1961? Please include its series code and license type.
Evidence: Total reserves minus gold (current US$) is the IndicatorName; Haiti is the CountryName; Year = 1961
SQL: SELECT T2.Topic, T2.Seriescode, T2.LicenseType FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName WHERE T1.Year = 1961 AND T1.CountryName = 'Haiti' AND T1.IndicatorName = 'Total reserves minus gold (current US$)' AND T1.Value = 3000000

Database: cars
Question: Which country produced the most fuel-efficient car?
Evidence: the most fuel-efficient refers to max(mpg)
SQL: SELECT T3.country FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country ORDER BY T1.mpg DESC LIMIT 1

Database: movies_4
Question: Write the person ID and character name of casts between order numbers 1 and 10 in Movie No. 285.
Evidence: casts between order numbers 1 and 10 refers to cast_order BETWEEN 2 AND 9; Movie No. 285 refers to movie_id = 285
SQL: SELECT person_id, character_name FROM movie_cast WHERE movie_id = 285 AND cast_order BETWEEN 1 AND 10

Database: cookbook
Question: Which recipe needs the most frozen raspberries in light syrup? State its title.
Evidence: frozen raspberries in light syrup is a name of an ingredient; max_qty = min_qty
SQL: SELECT T1.title FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T3.name = 'frozen raspberries in light syrup' AND T2.max_qty = T2.min_qty