Database: synthea
Question: Calculate the average period of Mr. Wesley Lemke's care plans.
Evidence: DIVIDE(SUBTRACT(stop time - start time), COUNT(ID)));
SQL: SELECT CAST(SUM(strftime('%J', T2.STOP) - strftime('%J', T2.START)) AS REAL) / COUNT(T1.patient) FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mr.' AND T1.first = 'Wesley' AND T1.last = 'Lemke'

Database: public_review_platform
Question: How many "cute" type of compliments does user No. 57400 get?
Evidence: type of compliments refers to compliment_type; user No. refers to user_id;
SQL: SELECT COUNT(T1.compliment_type) FROM Compliments AS T1 INNER JOIN Users_Compliments AS T2 ON T1.compliment_id = T2.compliment_id WHERE T1.compliment_type LIKE 'cute' AND T2.user_id = 57400

Database: disney
Question: Name the villain of the movie with Scott Weinger and Brad Kane as voice actors.
Evidence: FALSE;
SQL: SELECT T1.villian FROM characters AS T1 INNER JOIN `voice-actors` AS T2 ON T1.movie_title = T2.movie WHERE T2.`voice-actor` = 'Scott Weinger Brad Kane'

Database: retail_complains
Question: In 2012, how many complaints about Credit card product came from clients in Omaha?
Evidence: in 2012 refers to Date received LIKE'2012%'; in Omaha refers to city = 'Omaha'
SQL: SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.city = 'Omaha' AND strftime('%Y', T2.`Date received`) = '2012' AND T2.Product = 'Credit card'

Database: movies_4
Question: List the title of movies in Latin released between 1/01/1990 and 12/31/1995.
Evidence: movies in Latin refers to language_name = 'Latin'; released between 1/01/1990 and 12/31/1995 refers to release_date BETWEEN '1990-01-01' AND '1995-12-31'
SQL: SELECT T1.title FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id WHERE T3.language_name = 'Latin' AND T1.release_date BETWEEN '1990-01-01' AND '1995-12-31'

Database: address
Question: What are the precise locations of the cities with an area code of 787?
Evidence: precise location refers to latitude, longitude
SQL: SELECT T2.latitude, T2.longitude FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = '787' GROUP BY T2.latitude, T2.longitude

Database: music_tracker
Question: Provide the name of artists who had no more than 100 downloads and are tagged "funk" in 1980.
Evidence: no more than 100 downloads refer to totalSnatched ≤ 100; groupYear = 1980; tag = 'funk';
SQL: SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'funk' AND T1.groupYear = 1980 AND T1.totalSnatched <= 100

Database: food_inspection_2
Question: Which facilities were inspected by Sarah Lindsey on 20th November 2012?
Evidence: facility name refers to dba_name; on 20th November 2012 refers to inspection_date = '2012-11-20'
SQL: SELECT DISTINCT T1.dba_name FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN employee AS T3 ON T2.employee_id = T3.employee_id WHERE T2.inspection_date = '2012-11-20' AND T3.first_name = 'Sarah' AND T3.last_name = 'Lindsey'

Database: donor
Question: What is the short description for the title Future Einsteins Of America?
SQL: SELECT short_description FROM essays WHERE title = 'Future Einsteins Of America'

Database: image_and_language
Question: What are the corresponding classes for the "very large bike" attribute?
Evidence: attribute refers to ATT_CLASS
SQL: SELECT ATT_CLASS_ID FROM ATT_CLASSES WHERE ATT_CLASS = 'very large'

Database: legislator
Question: List down the district number of the representative of the house named Jonathan Grout.
Evidence: district number refers to district; representative of the house refers to type = 'rep';
SQL: SELECT T2.district FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.last_name = 'Grout' AND T1.first_name = 'Jonathan' AND T2.type = 'rep'

Database: address
Question: Show the zip code of the county represented by Buchanan Vernon.
SQL: SELECT T2.zip_code FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district WHERE T1.first_name = 'Buchanan' AND T1.last_name = 'Vernon'

Database: image_and_language
Question: Name number of samples of "bed" object are there in the image No.1098?
Evidence: samples of "bed" object refer to OBJ_SAMPLE_ID where OBJ_CLASS = 'bed'; image No.1098 refers to IMG_ID = 1098;
SQL: SELECT SUM(CASE WHEN T2.OBJ_CLASS = 'bed' THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 1098

Database: authors
Question: State the year and title of papers written by Barrasa.
Evidence: 'Barassa' is name of paper author
SQL: SELECT T1.Year, T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Barrasa'

Database: cs_semester
Question: For the students with an intelligence of 5, list the full name and courses taken by them who have less than a 3 GPA.
Evidence: full name of the students = f_name, l_name; gpa < 3;
SQL: SELECT T1.f_name, T1.l_name, T3.name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.intelligence = 5 AND T1.gpa < 3

Database: world_development_indicators
Question: Which upper middle income country has the lowest value of CO2 emissions (kt)?
Evidence: IncomeGroup = 'Upper middle income'; IndicatorName = 'CO2 emissions (kt); the lowest value refers to MIN(Value);
SQL: SELECT T1.CountryCode FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IncomeGroup = 'Upper middle income' AND T2.IndicatorName = 'CO2 emissions (kt)' ORDER BY T2.Value ASC LIMIT 1

Database: university
Question: Name the university that had the most students in 2011.
Evidence: in 2011 refers to year = 2011; had the most students refers to MAX(num_students); name of university refers to university_name;
SQL: SELECT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2011 ORDER BY T1.num_students DESC LIMIT 1

Database: mental_health_survey
Question: What are the ages of the oldest and youngest user that were surveyed? Indicate their user id.
Evidence: Oldest user refer to MAX(AnswerText) where questionid = 1; Youngest user refer to MIN(AnswerText) where questionid = 1

SQL: SELECT MAX(T1.AnswerText), MIN(T1.AnswerText) , ( SELECT T1.UserID FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questionid = 1 ORDER BY T1.AnswerText LIMIT 1 ) AS "youngest id" FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questionid = 1

Database: social_media
Question: Among all the users that have posted a tweet with over 1000 likes, how many of them are male?
Evidence: over 1000 likes refers to Likes > 1000; 'Male' is the Gender of user
SQL: SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.Likes > 10 AND T2.Gender = 'Male'

Database: shakespeare
Question: From 1593 onwards, what is the difference between the number of comedy works and history works?
Evidence: From 1593 onwards refers to Date > 1593; comedy works and history works refers to GenreType = 'comedy' and GenreType = 'History'
SQL: SELECT SUM(IIF(GenreType = 'Comedy', 1, 0)) - SUM(IIF(GenreType = 'History', 1, 0)) FROM works WHERE Date > 1593

Database: books
Question: Which books have the most expensive price?
Evidence: most expensive book refers to Max(price)
SQL: SELECT T2.title FROM order_line AS T1 INNER JOIN book AS T2 ON T1.book_id = T2.book_id ORDER BY T1.price DESC LIMIT 1