Database: menu
Question: Please list the IDs of the menus that are DIYs of the restaurant and have the dish "Clear green turtle".
Evidence: IDs of the menus refers to menu_id; menus that are DIYs of the restaurant refers to sponsor is null; Clear green turtle is a name of dish;
SQL: SELECT T2.menu_id 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 T4.name = 'Clear green turtle' AND T3.sponsor IS NULL

Database: food_inspection_2
Question: Calculate the percentage of inspections with verified quality. Among them, how many businesses were from Chicago?
Evidence: verified quality refers to results like 'Pass%'; from Chicago refers to city = 'CHICAGO'; percentage = divide(count(inspection_id where results like 'Pass%'), sum(inspection_id)) * 100%
SQL: SELECT CAST(COUNT(CASE WHEN T2.results LIKE '%Pass%' THEN T2.inspection_id END) AS REAL) * 100 / COUNT(T2.inspection_id), COUNT(DISTINCT T2.license_no) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T1.city = 'CHICAGO'

Database: video_games
Question: For all the games which were published by Namco Bandai Games, what percentage of them were adventure games?
Evidence: published by Namco Bandai Games refers to publisher_name = 'Namco Bandai Games'; adventure game refers to genre_name = 'Adventure'; percentage = divide(sum(game_id where genre_name = 'Adventure'), count(game_id)) * 100% where publisher_name = 'Namco Bandai Games'
SQL: SELECT CAST(COUNT(CASE WHEN T4.genre_name = 'Adventure' THEN T1.id ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id INNER JOIN genre AS T4 ON T1.genre_id = T4.id WHERE T3.publisher_name = 'Namco Bandai Games'

Database: video_games
Question: When was the "Adventure Island" game released?
Evidence: when refers to release_year; the "Adventure Island" game refers to game_name = 'Adventure Island'
SQL: SELECT T3.release_year FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id WHERE T1.game_name = 'Adventure Island'

Database: authors
Question: How many authors does the paper "Equation Solving in Geometrical Theories" have?
Evidence: "Equation Solving in Geometrical Theories" is the title of paper
SQL: SELECT COUNT(T1.AuthorId) FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T2.Title = 'Equation Solving in Geometrical Theories'

Database: image_and_language
Question: How many samples of food object are there in image no.6?
Evidence: samples of food object refers to OBJ_CLASS = 'food'; image no.6 refers to IMG_ID = 6
SQL: SELECT COUNT(T2.OBJ_SAMPLE_ID) FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 6 AND T1.OBJ_CLASS = 'food'

Database: restaurant
Question: On what street in Tuolumne County is Good Heavens restaurant located?
Evidence: street refers to street_name; Good Heavens restaurant refers to label = 'good heavens'
SQL: SELECT T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant INNER JOIN geographic AS T3 ON T2.city = T3.city WHERE T2.label = 'good heavens' AND T3.county = 'tuolumne county'

Database: movie_3
Question: How many times was "Blanket Beverly" rented?
Evidence: "BLANKET BEVERLY" is the title of film; rented times refers to count(rental_id)
SQL: SELECT COUNT(T3.rental_id) 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 WHERE T1.title = 'Blanket Beverly'

Database: authors
Question: What is the proportion of the papers that have the keyword "cancer"? Please provide a list of authors and their affiliations.
Evidence: Proportion refer to DIVIDE(COUNT(Keyword = ’cancer’), COUNT(PaperID))
SQL: SELECT CAST(SUM(CASE WHEN T1.Keyword = 'cancer' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.Id), T2.Name, T2.Affiliation FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId

Database: public_review_platform
Question: How many of the users who use a high number of compliments do not have any fans?
Evidence: do not have fans refers to user_fans = 'None'; high number of compliment refers to number_of_compliments = 'High'
SQL: SELECT COUNT(T2.user_id) FROM Users_Compliments AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id WHERE T1.number_of_compliments = 'High' AND T2.user_fans = 'None'

Database: olympics
Question: What is the name of the Olympic game with the most competitors held in Barcelona?
Evidence: Barcelona refers to city_name = 'Barcelona'; the most competitors refer to MAX(COUNT(games_name)); name of game refers to games_name;
SQL: SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN games_city AS T3 ON T2.games_id = T3.games_id INNER JOIN city AS T4 ON T3.city_id = T4.id WHERE T4.city_name = 'Barcelona' GROUP BY T1.id ORDER BY COUNT(T2.person_id) DESC LIMIT 1

Database: chicago_crime
Question: What is the average number of incidents per month in 2018 in the ward with the most population?
Evidence: in 2018 refers to date like '%2018%'; ward with most population refers to Max(Population); average number of incident per month refers to Divide(Count(ward_no), 12)
SQL: SELECT COUNT(T1.ward_no) / 12 AS average FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no WHERE T2.date LIKE '%2018%' AND T1.Population = ( SELECT MAX(T1.Population) FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no WHERE T2.date LIKE '%2018%' )

Database: retails
Question: List down the countries that are located in Asia.
Evidence: countries in Asia refer to n_name where r_name = 'ASIA';
SQL: SELECT T1.n_name FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey WHERE T2.r_name = 'ASIA'

Database: movies_4
Question: What is the genre of the movie title which was well-received by the audiences but made the lowest revenue?
Evidence: genre refers to genre_name; well-received by the audiences refers to max(vote_average); lowest revenue refers to min(revenue)
SQL: SELECT T3.genre_name FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id ORDER BY T1.vote_average DESC, T1.revenue LIMIT 1

Database: university
Question: What is the ranking system ID of the award criteria?
Evidence: award criteria refers to criteria_name = 'Award';
SQL: SELECT ranking_system_id FROM ranking_criteria WHERE criteria_name = 'Award'

Database: talkingdata
Question: How many events did the 88-years-old male users participate on 4th May,2016?
Evidence: 88-years-old refers to age = 88; male refers to gender = 'M'; on 4th May, 2016 refers to timestamp LIKE '2016-05-04%';
SQL: SELECT COUNT(T2.event_id) FROM gender_age AS T1 INNER JOIN events AS T2 ON T2.device_id = T1.device_id WHERE T1.gender = 'M' AND SUBSTR(`timestamp`, 1, 10) = '2016-05-04' AND T1.age = 88

Database: simpson_episodes
Question: Which country has the tallest person in the crew?
Evidence: country refers to birth_country; tallest person refers to max(height_meters)
SQL: SELECT birth_country FROM Person ORDER BY height_meters DESC LIMIT 1;

Database: synthea
Question: According to the observation on 2008/3/11, what was the height of Elly Koss?
Evidence: 2008/3/11 refers to date = '2008-03-11'; height refers to DESCRIPTION = 'Body Height' from observations;
SQL: SELECT T2.value, T2.units FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.date = '2008-03-11' AND T2.description = 'Body Height'