Database: cs_semester
Question: Among professors with the highest teachability, how many of their students have high salary?
Evidence: highest teachability refers to MAX(teachability); high salary refers to salary = 'high';
SQL: SELECT COUNT(T1.student_id) FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id WHERE T1.salary = 'high' ORDER BY T2.teachingability DESC LIMIT 1

Database: retail_world
Question: How many product names have order quantity less than 50? Calculate the percentage of orders less than 50 out of total order quantity.
Evidence: order quantity less than 50 refers to Quantity < 50; Calculation = DIVIDE(SUM(Quantity < 50), SUM(ProductID)) * 100
SQL: SELECT SUM(CASE WHEN T2.Quantity < 50 THEN 1 ELSE 0 END) , CAST(SUM(IF(T2.Quantity < 50, 1, 0)) AS REAL) / COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID

Database: mental_health_survey
Question: How many users answered "Yes" to the question "Have you had a mental health disorder in the past?" in 3 consecutive years starting from 2016?
Evidence: question refers to questiontext; answered 'Yes' to question refers to AnswerText = 'Yes'; 3 consecutive years starting from 2016 refers to SurveyID = 2016 and SurveyID = 2017 and SurveyID = 2018
SQL: SELECT COUNT(T2.UserID) FROM Question AS T1 INNER JOIN Answer AS T2 ON T1.questionid = T2.QuestionID WHERE T2.SurveyID IN (2016, 2017, 2018) AND T1.questiontext LIKE 'Have you had a mental health disorder in the past?' AND T2.AnswerText = 'Yes'

Database: retails
Question: How many suppliers for the part "hot spring dodger dim light" are in Vietnam?
Evidence: part "hot spring dodger dim light" refers to p_name = 'hot spring dodger dim light'; Vietnam refers to n_name = 'VIETNAM'
SQL: SELECT COUNT(T3.s_name) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey INNER JOIN nation AS T4 ON T3.s_nationkey = T4.n_nationkey WHERE T1.p_name = 'hot spring dodger dim light' AND T4.n_name = 'VIETNAM'

Database: beer_factory
Question: Which brand of root beer did Jayne Collins give the lowest rating?
Evidence: brand of root beer refers to BrandName; lowest rating refers to MIN(StarRating);
SQL: SELECT T3.BrandName FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN rootbeerbrand AS T3 ON T2.BrandID = T3.BrandID WHERE T1.First = 'Jayne' AND T1.Last = 'Collins' AND T2.StarRating = 1

Database: car_retails
Question: How many Sales Manager who are working in Sydney? List out their email.
Evidence: Sales Manager is a job title; Sydney is a city;
SQL: SELECT T1.email FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T1.jobTitle LIKE '%Sales Manager%' AND T2.city = 'Sydney'

Database: law_episode
Question: For season 9, episode 17 of the show Law and Order, how many roles have been included in the credit?
Evidence: Law and Order refers to series = 'Law and Order'; included in the credit refers to credited = 'true'
SQL: SELECT COUNT(T2.role) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.series = 'Law and Order' AND T1.season = 9 AND T1.episode = 17 AND T2.credited = 'true'

Database: chicago_crime
Question: Calculate the percentage of the domestic violence cases handled by Christopher Taliaferro. Among them, list report numbers of cases that happened in the bank.
Evidence: domestic violence refers to domestic = 'TRUE'; report number refers to report_no; in the bank refers to location_description = 'BANK'; percentage = divide(count(report_no where domestic = 'TRUE'), count(report_no)) * 100%
SQL: SELECT CAST(COUNT(CASE WHEN T1.domestic = 'TRUE' THEN T1.report_no END) AS REAL) * 100 / COUNT(T1.report_no), COUNT(CASE WHEN T1.domestic = 'TRUE' AND T1.location_description = 'BANK' THEN T1.report_no END) AS "number" FROM Crime AS T1 INNER JOIN Ward AS T2 ON T2.ward_no = T1.ward_no WHERE T2.alderman_first_name = 'Christopher' AND T2.alderman_last_name = 'Taliaferro'

Database: video_games
Question: Indicate the publisher who has published the most games of all time.
Evidence: publisher refers to publisher_name; publisher who has published the most games of all time refers to MAX(COUNT(publisher_name));
SQL: SELECT T.publisher_name FROM ( SELECT T2.publisher_name, COUNT(DISTINCT T1.game_id) FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id GROUP BY T2.publisher_name ORDER BY COUNT(DISTINCT T1.game_id) DESC LIMIT 1 ) t

Database: european_football_1
Question: How many matches were held during the 2021 season's Premier League?
Evidence: Premier League is the name of division;
SQL: SELECT COUNT(T1.Div) FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.season = 2021 AND T2.name = 'Premier League'

Database: books
Question: Provide the ISBN and price of the book with book ID 7160.
Evidence: ISBN refers to isbn13;
SQL: SELECT T1.isbn13, T2.price FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T2.book_id = 6503

Database: disney
Question: Who is the voice actor of the hero character from the movie The Little Mermaid?
Evidence: The Little Mermaid refers to movie_title = 'The Little Mermaid';
SQL: SELECT T2.`voice-actor` FROM characters AS T1 INNER JOIN `voice-actors` AS T2 ON T2.movie = T1.movie_title WHERE T1.movie_title = 'The Little Mermaid' AND T2.character = T1.hero

Database: retail_world
Question: How many kinds of products are there in the the category of "dairy products"?
Evidence: kinds of products refers to ProductID; category refers to CategoryName;
SQL: SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.CategoryName = 'Dairy Products'

Database: legislator
Question: Please list the official full names of all the current legislators who were once a senator during his or her terms.
Evidence: once a senator during term refers to state_rank IS NOT NULL
SQL: SELECT T2.official_full_name FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.state_rank IS NOT NULL

Database: image_and_language
Question: On image no. 5, name the attributes that are composed of multiple objects.
Evidence: image no. 5 refers to IMG_ID = 5; name the attributes refers to ATT_CLASS; multiple objects refers to count(ATT_CLASS) > = 2
SQL: SELECT T2.ATT_CLASS FROM IMG_OBJ_ATT AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.IMG_ID = 5 GROUP BY T2.ATT_CLASS HAVING COUNT(T2.ATT_CLASS) > 2

Database: world
Question: What is the capital city of the Philippines?
Evidence: capital city refers to Capital; Philippines is a name of country;
SQL: SELECT T1.Capital FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Philipiines'

Database: video_games
Question: How many FIFA games are there across all platforms?
Evidence: FIFA games refers to game_name LIKE '%FIFA%';
SQL: SELECT COUNT(*) FROM ( SELECT T.game_name FROM game AS T WHERE T.game_name LIKE '%FIFA%' )

Database: authors
Question: List all the paper that the journal "Theoretical Computer Science
" published in 2003.
Evidence: 'Theoretical Computer Science' is the FullName; paper refers to Title; published in 2003 refers to Year = 2003
SQL: SELECT DISTINCT T1.Title FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T2.FullName = 'Theoretical Computer Science' AND T1.Year = 2003 AND T1.Title <> ''

Database: synthea
Question: Please include the full name of the patient who received a lung transplant.
Evidence: full name = first, last; lung transplant refers to procedures.DESCRIPTION = 'Transplant of lung (procedure)';
SQL: SELECT T2.first, T2.last FROM procedures AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Transplant of lung (procedure)'