Database: regional_sales
Question: List the ID, city, state and region for the store type which is fewer between borough and CDP.
Evidence: COUNT(StoreID) < COUNT(StoreID where Type = 'Borough') < COUNT(StoreID where Type = 'CDP');
SQL: SELECT DISTINCT T2.StoreID, T2.`City Name`, T1.State, T2.Type FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode WHERE T2.Type = 'Borough' OR T2.Type = 'CDP'

Database: retail_world
Question: What are the product names of Exotic Liquids?
Evidence: "Exotic Liquids" is the CompanyName
SQL: SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Exotic Liquids'

Database: retail_world
Question: What products were ordered by the customer ID "WILMK" which were required on 3/26/1998?
Evidence: required on 3/26/1998 refers to RequiredDate = '1998-03-26 00:00:00'; products ordered refers to ProductName
SQL: SELECT T3.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T1.RequiredDate LIKE '1998-03-26%' AND T1.CustomerID = 'WILMK'

Database: soccer_2016
Question: List the ball IDs, scores, and innings numbers in the over ID 20 of match ID "335988".
Evidence: innings numbers refers to Innings_No
SQL: SELECT Ball_Id, Runs_Scored, Innings_No FROM Batsman_Scored WHERE Match_Id = 335988 AND Over_Id = 20

Database: law_episode
Question: What is the average rating for each episode in season 9?
Evidence: average rating = divide(sum(rating), count(episode_id))
SQL: SELECT SUM(rating) / COUNT(episode_id) FROM Episode WHERE season = 9

Database: movies_4
Question: The movie 'Gojira ni-sen mireniamu' is from which country?
Evidence: movie 'Gojira ni-sen mireniamu' refers to title = 'Gojira ni-sen mireniamu'; which country refers to country_name
SQL: SELECT T3.COUNTry_name FROM movie AS T1 INNER JOIN production_COUNTry AS T2 ON T1.movie_id = T2.movie_id INNER JOIN COUNTry AS T3 ON T2.COUNTry_id = T3.COUNTry_id WHERE T1.title = 'Gojira ni-sen mireniamu'

Database: retail_complains
Question: Calculate the percentage of male clients from Indianapolis City.
Evidence: male refers to sex = 'Male'; Indianapolis City refers to city = 'Indianapolis'; percentage = divide(count(client_id where sex = 'Male' and city = 'Indianapolis') , count(client_id where city = 'Indianapolis')) * 100%
SQL: SELECT CAST(SUM(CASE WHEN sex = 'Male' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(client_id) FROM client WHERE city = 'Indianapolis'

Database: movie_3
Question: Which customer has rented more movies, RUTH MARTINEZ or LINDA WILLIAMS?
Evidence: rented more movie Max(Count(customer_id)); "RUTH MARTINEZ" and "LINDA WILLIAMS" are both full name of customer
SQL: SELECT T.first_name, T.last_name FROM ( SELECT T1.first_name, T1.last_name, COUNT(T1.customer_id) AS num FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE (T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ') OR (T1.first_name = 'LINDA' AND T1.last_name = 'WILLIAMS') GROUP BY T1.first_name, T1.last_name ) AS T ORDER BY T.num DESC LIMIT 1

Database: software_company
Question: What is the number of inhabitants of male customers ages from 20 to 30 years old who are farming or fishing?
Evidence: male customers ages from 20 to 30 years old refer to SEX = 'Male' where age BETWEEN 20 AND 30; farming or fishing refers to OCCUPATION; number of inhabitants refers to INHABITANTS_K;
SQL: SELECT T2.INHABITANTS_K FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.OCCUPATION = 'Farming-fishing' AND T1.SEX = 'Male' AND T1.age >= 20 AND T1.age <= 30

Database: bike_share_1
Question: How many docks were left at the end station for trip ID4069?
Evidence: end station refers to end_station_id; docks that were left refers to docks_available;
SQL: SELECT SUM(T2.docks_available) FROM trip AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.end_station_id WHERE T1.ID = 4069

Database: world
Question: What is the surface area and GNP of the country where Namibe district belongs?
SQL: SELECT T2.SurfaceArea, T2.GNP FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.District = 'Namibe'

Database: movie_3
Question: Give the name of the film for inventory No.3479.
Evidence: inventory no. 3479 refers to inventory_id = '3479'; name of film refers to title
SQL: SELECT T1.title FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T2.inventory_id = 3479

Database: movie_3
Question: What is the name of the most rented movie?
Evidence: most rented movie refers to title where Max(Count(rental_id))
SQL: SELECT T.title FROM ( SELECT T1.title, COUNT(T3.rental_id) AS num FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id INNER JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T1.title ) AS T ORDER BY T.num DESC LIMIT 1

Database: menu
Question: List the dishes that appeared at the left upper corner of the CHAS.BRADLEY'S OYSTER & DINING ROOM"s sponsored menu.
Evidence: appeared at the left upper corner refers to xpos < 0.25 and ypos < 0.25; CHAS.BRADLEY'S OYSTER & DINING ROOM refers to sponsor = 'CHAS.BRADLEY''S OYSTER & DINING ROOM';
SQL: SELECT T4.name FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id INNER JOIN Dish AS T4 ON T1.dish_id = T4.id WHERE T3.sponsor = 'CHAS.BRADLEY''S OYSTER & DINING ROOM' AND T1.xpos < 0.25 AND T1.ypos < 0.25

Database: food_inspection_2
Question: Name the food businesses that passed the inspection in 2010.
Evidence: business name refers to dba_name; food business refers to restaurant; pass the inspection refers to results = 'Pass'; in 2010 refers to inspection_date like '2010%'
SQL: SELECT DISTINCT T1.dba_name FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE strftime('%Y', T2.inspection_date) = '2010' AND T2.results = 'Pass' AND T1.facility_type = 'Liquor'

Database: simpson_episodes
Question: How many recipients of the Primetime Emmy Award category that were born in the USA? Find the percentage of Americans in the total number of the country.
Evidence: born in the USA refers to birth_country = 'USA'; recipients refers to person = 'recipients'; percentage refers to DIVIDE(COUNT(birth_country = 'USA'), count(award_id))
SQL: SELECT SUM(CASE WHEN T1.birth_country = 'USA' THEN 1 ELSE 0 END) AS num , CAST(SUM(CASE WHEN T1.birth_country = 'USA' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.award_category = 'Primetime Emmy' AND T2.person = 'Dan Castellaneta';

Database: movie_platform
Question: Please list all the critics made by the user rating the movie "A Way of Life".
Evidence: A Way of Life refers to movie_title;
SQL: SELECT T1.critic FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'A Way of Life'

Database: donor
Question: Is the donor who donated to school "d4af834b1d3fc8061e1ee1b3f1a77b85" a teacher?
Evidence: school "d4af834b1d3fc8061e1ee1b3f1a77b85" refers to schoolid = 'd4af834b1d3fc8061e1ee1b3f1a77b85'; donor is a teacher refers to is_teacher_acct = 't';
SQL: SELECT T2.is_teacher_acct FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.schoolid = 'd4af834b1d3fc8061e1ee1b3f1a77b85'

Database: movie_platform
Question: Show the head portrait of the user who gave the most "5" ratings.
Evidence: head portrait refers to user_avatar_image_url; "5" ratings refers to rating_score = 5
SQL: SELECT T2.user_avatar_image_url FROM ratings AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id WHERE T1.rating_score = 5