Database: movielens
Question: How many of the users who rate the movie with the id '2462959' are female?
Evidence: Female users mean that u_gender = 'F'
SQL: SELECT COUNT(T1.userid) FROM users AS T1 INNER JOIN u2base AS T2 ON T1.userid = T2.userid WHERE T2.userid = 2462959 AND T1.u_gender = 'F'

Database: retail_complains
Question: What is the email address of clients who submitted their complaints via postal mail?
Evidence: via postal mail refers to Submitted via = 'Postal mail'
SQL: SELECT T1.email FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Submitted via` = 'Postal mail'

Database: movies_4
Question: What is the longest runtime of all movies?
Evidence: longest runtime refers to max(runtime)
SQL: SELECT MAX(runtime) FROM movie

Database: movie_platform
Question: State the most popular movie? When was it released and who is the director for the movie?
Evidence: most popular movie refers to MAX(movie_popularity); when it was released refers to movie_release_year; director for the movie refers to director_name;
SQL: SELECT movie_title, movie_release_year, director_name FROM movies ORDER BY movie_popularity DESC LIMIT 1

Database: superstore
Question: Provide the names of the products with a profit greater than 98% of the average profit of all products in the East region.
Evidence: names of the products refers to "Product Name";  profit greater than 98% of the average profit refers to Profit > MULTIPLY(AVG(Profit), 0.98)
SQL: SELECT DISTINCT T2.`Product Name` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Region = 'East' AND T1.Profit > ( SELECT AVG(Profit) * 0.98 FROM east_superstore )

Database: disney
Question: What movies did director Jack Kinney direct?
Evidence: FALSE;
SQL: SELECT name FROM director WHERE director = 'Jack Kinney'

Database: sales
Question: How many free gifts have customer with id 11782 received?
Evidence: free gifts refers to Price = 0;
SQL: SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.CustomerID = 11782 AND T1.Price = 0

Database: legislator
Question: Calculate the average number of current male legislators who chose Democrat from 2000 until 2021.
Evidence: male refers to gender_bio = 'M'; legislators who chose Democrat refers to party = 'Democrat'; from 2000 until 2021 refers to start > = 2000 AND END < = 2021; calculation = DIVIDE(COUNT(bioguide_id), 22)
SQL: SELECT CAST(COUNT(T1.bioguide_id) AS REAL) / 22 FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'M' AND CAST(T2.start AS DATE) >= 2000 AND CAST(T2.END AS DATE) <= 2021 AND T2.party = 'Democrat'

Database: movie_3
Question: Identify the number of movies rented by Maria Miller.
SQL: SELECT COUNT(T2.rental_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'Maria' AND T1.last_name = 'Miller'

Database: public_review_platform
Question: Which actively running Yelp business in "Gilbert" has got the most reviews? Give the business id.
Evidence: actively running business refers to active = 'true'; 'Gilbert' is the name of city; most review refers to review_count = 'Uber'
SQL: SELECT DISTINCT T1.business_id FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.active = 'true' AND T1.city = 'Gilbert' AND T1.review_count = 'Uber'

Database: retail_world
Question: How much is the salary of the first employee that was hired?
Evidence: first employee that was hired refers to MIN(HireDate)
SQL: SELECT Salary FROM Employees WHERE HireDate = ( SELECT MIN(HireDate) FROM Employees )

Database: talkingdata
Question: What is the gender of the majority of Vivo phone users?
Evidence: majority of Vivo phone users refers to MAX(COUNT(phone_brand = 'vivo'));
SQL: SELECT T.gender FROM ( SELECT T2.gender, COUNT(T2.gender) AS num FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T2.device_id = T1.device_id WHERE T1.phone_brand = 'vivo' GROUP BY T2.gender ) AS T ORDER BY T.num DESC LIMIT 1

Database: retail_complains
Question: How many complaints are not in process with an agent?
Evidence: not in process with an agent refers to outcome ! = 'AGENT';
SQL: SELECT COUNT(outcome) FROM callcenterlogs WHERE outcome != 'AGENT'

Database: legislator
Question: What was current legislator Sherrod Brown's Washington, D.C. office phone number during his term starting on 2013/1/3?
Evidence: Washington, DC office phone number refers to phone; terms starting on 2013/1/3 refers to start = '2013-01-03';
SQL: SELECT T1.phone FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.official_full_name = 'Sherrod Brown' AND T1.start = '2013-01-03'

Database: mental_health_survey
Question: Tell the number of surveys that contained the question “What country do you work in?”.
Evidence: question refers to questiontext
SQL: SELECT COUNT(DISTINCT T1.QuestionID) FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid INNER JOIN Survey AS T3 ON T1.SurveyID = T3.SurveyID WHERE T2.questiontext = 'What country do you work in?'

Database: retails
Question: How many kinds of items are returned in order no.5?
Evidence: returned refer to l_returnflag = 'R'; order no.5 refers to l_orderkey = 5; kinds of items refer to l_linenumber;
SQL: SELECT COUNT(l_linenumber) FROM lineitem WHERE l_orderkey = 5 AND l_returnflag = 'R'

Database: retails
Question: How many parts have a retail price of over 1900?
Evidence: a retail price of over 1900 refers to p_retailprice > 1900
SQL: SELECT COUNT(p_partkey) FROM part WHERE p_retailprice > 1900

Database: shakespeare
Question: What are the work numbers that are related to King Henry?
Evidence: work numbers refers to works.id; related to King Henry refers to Title = '%Henry%'
SQL: SELECT id FROM works WHERE Title LIKE '%Henry%'

Database: computer_student
Question: Among the faculty affiliated professor, how many professors teaches professional or master/undergraduate courses?
Evidence: faculty affiliated professor refers to professor = 1 and hasPosition = 'Faculty_aff'; professional or master/undergraduate courses refers to courseLevel = 'Level_500'
SQL: SELECT COUNT(*) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id INNER JOIN course AS T3 ON T3.course_id = T2.course_id WHERE T1.hasPosition = 'Faculty_aff' AND T1.professor = 1 AND T3.courseLevel = 'Level_500'

Database: image_and_language
Question: What is the predicate class of image ID 68?
Evidence: predicate class of image ID 68 refers to PRED_CLASS where IMG_ID = 68;
SQL: SELECT 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 = 68

Database: bike_share_1
Question: How many bike stations were installed in San Jose in 2014? Indicate the names of the stations.
Evidence: San Jose is the name of the city; 2014 refers to installation_date between '1/1/2014' and '12/31/2014';
SQL: SELECT SUM(CASE WHEN city = 'San Jose' AND SUBSTR(installation_date, -4) = '2014' THEN 1 ELSE 0 END) FROM station UNION SELECT name FROM station WHERE city = 'San Jose' AND SUBSTR(installation_date, -4) = '2014'

Database: language_corpus
Question: How many words has the appearance times greater than 10?
Evidence: appearance times greater than 10 refers to occurrences > 10;
SQL: SELECT COUNT(w1st) AS countwords FROM biwords WHERE occurrences > 10