Database: synthea
Question: Write down the Social Security numbers of patients who have latex allergies.
Evidence: Social Security numbers refers to ssn; latex allergies refers to allergies.DESCRIPTION = 'Latex allergy';
SQL: SELECT T1.ssn FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Latex allergy'

Database: codebase_comments
Question: What is the path of solution of "spinachLexer.mT__55" method?
Evidence: path of the solution refers to Path; solution refers to Solution.Id; method refers to Name; Name = 'spinachLexer.mT__55';
SQL: SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Name = 'spinachLexer.mT__55'

Database: movie_3
Question: List down the film titles performed by Emily Dee.
SQL: SELECT T3.title FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'Emily' AND T1.last_name = 'Dee'

Database: movielens
Question: What is the total average movie directed by the directors who's quality and revenue is 4?
SQL: SELECT CAST(SUM(CASE WHEN T1.d_quality = 4 AND T1.avg_revenue = 4 THEN 1 ELSE 0 END) AS REAL) / COUNT(T2.movieid) FROM directors AS T1 INNER JOIN movies2directors AS T2 ON T1.directorid = T2.directorid

Database: computer_student
Question: Among the courses that are basic or medium undergraduate courses, how many of them are taught by a faculty member?
Evidence: courses that are basic or medium undergraduate courses refers to courseLevel = 'Level_300'; faculty member refers to hasPosition ! = 0
SQL: SELECT COUNT(*) FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.professor = 1 AND T1.courseLevel = 'Level_300'

Database: talkingdata
Question: Describe the ages, genders and numbers of events participated by the users at coordinates of (-102,38).
Evidence: coordinates of (-102,38) refers to longitude = -102, latitude = 38;
SQL: SELECT DISTINCT T1.age, T1.gender, COUNT(T2.event_id) FROM gender_age AS T1 INNER JOIN `events` AS T2 ON T2.device_id = T1.device_id WHERE T2.longitude = -102 AND T2.latitude = 38 GROUP BY T1.age, T1.gender, T2.longitude, T2.latitude

Database: books
Question: Among the books ordered by Lucas Wyldbore, how many of them are over 300 pages?
Evidence: books have over 300 pages refers to num_pages > 300
SQL: SELECT COUNT(*) FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T4.first_name = 'Lucas' AND T4.last_name = 'Wyldbore' AND T1.num_pages > 300

Database: bike_share_1
Question: In 2006, how many trips ended at stations in Mountain View?
Evidence: in 2006 refers to start_date LIKE'%2006%'; ended at station refers to end_station_name; Mountain View refers to city = 'Mountain View';
SQL: SELECT COUNT(T2.city) FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.end_station_name WHERE T2.city = 'Mountain View' AND T1.start_date LIKE '%2006%'

Database: superstore
Question: What product category that Sam Craven ordered from the central and east superstore?
SQL: SELECT DISTINCT T3.Category FROM east_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` LEFT JOIN central_superstore AS T4 ON T3.`Product ID` = T4.`Product ID` WHERE T2.`Customer Name` = 'Sam Craven'

Database: soccer_2016
Question: How many players bowl in the legbreak style?
Evidence: legbreak style refers to Bowling_skill = 'Legbreak'
SQL: SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id WHERE T2.Bowling_skill = 'Legbreak'

Database: menu
Question: How many menu items were created on 28th March 2011?
Evidence: created on 28th March 2011 refers to created_at like '2011-03-28%';
SQL: SELECT COUNT(*) FROM MenuItem WHERE created_at LIKE '2011-03-28%'

Database: public_review_platform
Question: Among the stopped businesses in San Tan Valley city, list down the user ID and review length of who had great experience.
Evidence: stop businesses refers to active = 'false'; great experience refers to review_stars = 5


SQL: SELECT T2.user_id, T2.review_length FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'San Tan Valley' AND T1.active = 'false' AND T2.review_stars = 5

Database: language_corpus
Question: How many Catalan language wikipedia pages have between 1000 to 2000 number of different words?
Evidence: between 1000 to 2000 number of different words refers to words BETWEEN 1000 AND 2000
SQL: SELECT COUNT(pid) FROM pages WHERE words BETWEEN 1000 AND 2000

Database: law_episode
Question: What are the names of the two people who won an award for their role as directors?
Evidence: won an award refers to result = 'Winner'; role as director refers to role = 'director'
SQL: SELECT T1.name FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id WHERE T2.Result = 'Winner' AND T2.role = 'director'

Database: retail_complains
Question: How many complaints from customers with a gmail.com email were received by the company in February 2017?
Evidence: gmail.com email refers to email like '%gmail.com'; in February 2017 refers to "Date received" BETWEEN '2017-01-02' AND '2017-02-28';
SQL: SELECT COUNT(T1.email) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE (T2.`Date received` LIKE '2017-02%' OR T2.`Date received` LIKE '2017-01%') AND T1.email LIKE '%@gmail.com'

Database: donor
Question: What is the title for the project that got the donation message as "Donation on behalf of Matt Carpenter because I'm a strong believer in education".
SQL: SELECT T1.title FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.donation_message LIKE 'Donation on behalf of Matt Carpenter because I''m a strong believer in education.'

Database: authors
Question: Name the title, year and keyword of the paper which were written by the author ID of 661002 with the affiliation of "Scientific Computing and Imaging Institute, University of Utah, UT 84112, USA" organization.
Evidence: "661002" is the AuthorId;  "Scientific Computing and Imaging Institute, University of Utah, UT 84112, USA" is the Affiliation organization
SQL: SELECT T2.Title, T2.Year, T2.Keyword FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.AuthorId = 661002 AND T1.Affiliation = 'Scientific Computing and Imaging Institute, University of Utah, UT 84112, USA'

Database: shakespeare
Question: How many number of paragraphs are there in chapter ID 18881?
Evidence: number of paragraphs refers to ParagraphNum
SQL: SELECT COUNT(ParagraphNum) FROM paragraphs WHERE chapter_id = 18881

Database: movie_3
Question: In which country is the store where Hector Poinexter rents equipment located?
Evidence: 'Hector Poinexter' is a full name of a customer; full name refers to first_name, last_name;
SQL: SELECT T5.country FROM customer AS T1 INNER JOIN store AS T2 ON T1.store_id = T2.store_id INNER JOIN address AS T3 ON T2.address_id = T3.address_id INNER JOIN city AS T4 ON T3.city_id = T4.city_id INNER JOIN country AS T5 ON T4.country_id = T5.country_id WHERE T1.first_name = 'HECTOR' AND T1.last_name = 'POINDEXTER'

Database: olympics
Question: How many competitor ids does Martina Kohlov have?
SQL: SELECT COUNT(T2.id) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id WHERE T1.full_name = 'Martina Kohlov'