Database: synthea
Question: How many male patients have prediabetes condition?
Evidence: male refers to gender = 'M'; prediabetes condition refers to conditions.DESCRIPTION = 'Prediabetes';
SQL: SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN conditions AS T2 WHERE T2.DESCRIPTION = 'Prediabetes' AND T1.gender = 'M'

Database: movielens
Question: What non-English American film/s has received the lowest user ratings? Mention the movie's I.D.
Evidence: USA is a country; non-English means isEnglish = 'F'
SQL: SELECT T2.movieid FROM movies AS T1 INNER JOIN u2base AS T2 ON T1.movieid = T2.movieid WHERE T1.isEnglish = 'F' AND T1.country = 'USA' ORDER BY T2.rating LIMIT 1

Database: superstore
Question: How many orders in the south superstore with the fastest delivery are items of furniture?
Evidence: fastest delivery refers to Ship Mode = 'First Class'; furniture refers to Category = 'Furniture'
SQL: SELECT COUNT(T1.`Order ID`) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Ship Mode` = 'First Class' AND T2.Category = 'Furniture'

Database: shakespeare
Question: Which chapter has the most paragraphs? Give the description of the chapter.
Evidence: most paragraphs refers to max(count(chapter_id))
SQL: SELECT T1.Description FROM chapters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.chapter_id ORDER BY T2.ParagraphNum DESC LIMIT 1

Database: authors
Question: Identify by conference full name all papers in which a journal was not published but a conference.
Evidence: journal was not published but a conference refers to ConferenceId ! = 0 And JournalId = 0 Year ! = 0
SQL: SELECT T2.FullName FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.ConferenceId != 0 AND T1.JournalId = 0 AND T1.Year != 0

Database: shipping
Question: What is the weight of the shipment delivered by Andrea Simons on March 7, 2016?
Evidence: on March 7, 2016 refers to ship_date = '2016-03-07'
SQL: SELECT T1.weight FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T2.first_name = 'Andrea' AND T2.last_name = 'Simons' AND T1.ship_date = '2016-03-07'

Database: chicago_crime
Question: Among the cases reported in the ward with Edward Burke as the alderman and happened in the community area with the highest population, provide the report number of the crime with the highest beat.
Evidence: the highest population refers to max(population); report number refers to report_no; the highest beat refers to max(beat)
SQL: SELECT T2.report_no FROM Ward AS T1 INNER JOIN Crime AS T2 ON T2.ward_no = T1.ward_no INNER JOIN Community_Area AS T3 ON T3.community_area_no = T2.community_area_no WHERE T1.alderman_first_name = 'Edward' AND T1.alderman_last_name = 'Burke' ORDER BY T2.beat DESC, T3.population DESC LIMIT 1

Database: menu
Question: Among the dishes on menu page ID 7610, list the names and highest prices of the dishes in menu items that were created on 23rd May 2011.
Evidence: highest prices of the dishes refers to MAX(price); created on 23rd May 2011 refers to created_at like '2011-05-23%';
SQL: SELECT T1.name, T2.price FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T2.created_at LIKE '2011-05-23%' ORDER BY T2.price DESC LIMIT 1

Database: movies_4
Question: Tally the movie ID and character name in the movie starring Jim Carrey.
SQL: SELECT T2.movie_id, T2.character_name FROM person AS T1 INNER JOIN movie_cast AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Jim Carrey'

Database: movie_3
Question: Please list the titles of all the films under the category of "Horror" and has a rental rate of $2.99.
Evidence: "Horror" is the name of category; rental rate of $2.99 refers to rental_rate = 2.99
SQL: SELECT T1.title FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'Horror' AND T1.rental_rate = 2.99

Database: superstore
Question: Calculate the average sales of ""Sharp AL-1530CS Digital Copier in the east and the west superstore.
Evidence: Sharp AL-1530CS Digital Copier' is the "Product Name"; average sales = AVG(Sales)
SQL: SELECT AVG(T1.Sales) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T3.`Product Name` = 'Sharp AL-1530CS Digital Copier'

Database: retails
Question: Which nation and region does the Customer#000000008 come from?
Evidence: nation refers to n_name; region refers to r_name; Customer#000000008 refers to c_name = 'Customer#000000008'
SQL: SELECT T1.n_name, T3.r_name FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN region AS T3 ON T1.n_regionkey = T3.r_regionkey WHERE T2.c_name = 'Customer#000000008'

Database: public_review_platform
Question: In users yelping since 2011 to 2013, how many of them have high count of fans?
Evidence: In users yelping since 2011 to 2013 refers to user_yelping_since_year > = 2011 AND user_yelping_since_year < 2014
SQL: SELECT COUNT(user_id) FROM Users WHERE user_yelping_since_year BETWEEN 2011 AND 2013 AND user_fans LIKE 'High'

Database: donor
Question: For what grade was the project "Too Close for Comfort" for?
Evidence: project "Too Close for Comfort" refers to title = 'Too Close for Comfort'; grade refers to grade_level
SQL: SELECT T1.grade_level FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T2.title LIKE 'Too Close for Comfort'

Database: image_and_language
Question: How many 'has' predicate classes does image ID 107 have?
Evidence: has' predicate classes refers to PRED_CLASS = 'has'; image ID 107 refers to IMG_ID = 107;
SQL: SELECT COUNT(T2.PRED_CLASS) FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 107 AND T2.PRED_CLASS = 'has'

Database: retail_world
Question: List all category name of Exotic Liquids 's product with units in stock over 100.
Evidence: 'Exotic Liquids' is a CompanyName; units in stock over 100 refers to UnitsInStock > 100
SQL: SELECT T3.CategoryName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.SupplierID INNER JOIN Categories AS T3 ON T2.CategoryID = T3.CategoryID WHERE T2.UnitsInStock > 100 AND T1.CompanyName = 'Exotic Liquids'

Database: world
Question: Among the countries that use Italian as their language, what is the percentage of republic countries?
Evidence: use Italian as their language refers to `Language` = 'Italian'; percentage = MULTIPLY(DIVIDE(SUM(`Language` = 'Italian' WHERE GovernmentForm = 'Republic'), COUNT(`Language` = 'Italian')), 100); use Italian as their language refers to `Language` = 'Italian'; republic countries refers to GovernmentForm = 'Republic';
SQL: SELECT CAST(SUM(CASE WHEN T2.GovernmentForm = 'Republic' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Language = 'Italian'

Database: restaurant
Question: How many restaurants have more than 4 star reviews?
Evidence: more than 4 star review refers to review > 4
SQL: SELECT COUNT(id_restaurant) AS cnt FROM generalinfo WHERE review > 4

Database: movie_platform
Question: Name movie titles released in year 1945. Sort the listing by the descending order of movie popularity.
Evidence: released in the year 1945 refers to movie_release_year = 1945;
SQL: SELECT movie_title FROM movies WHERE movie_release_year = 1945 ORDER BY movie_popularity DESC LIMIT 1