Database: student_loan
Question: What is the percentage difference between the attendence of disabled and non-disable students? Do the disable students show better attendance than non-disable students?
Evidence: difference = MULTIPLY(DIVIDE(SUBTRACT(COUNT(longest_absense_from_school.name that is in disabled.name), COUNT(longest _absense_from_school.name that is NOT in disabled.name), longest _absense_from_school.name), 100)); IF COUNT(longest_absense_from_school.name that is in disabled.name) < COUNT(longest _absense_from_school.name that is NOT in disabled.name), it means, the disabled students have better attendance than non-disabled students; IF COUNT(longest_absense_from_school.name that is in disabled.name) > COUNT(longest _absense_from_school.name that is NOT in disabled.name), it means the disabled students do not have a better attendance than non-disabled students;
SQL: SELECT CAST((SUM(IIF(T2.name IS NOT NULL AND T1.month = 0, 1, 0)) - SUM(IIF(T2.name IS NULL AND T1.month = 0, 1, 0))) AS REAL) * 100 / COUNT(T1.name), IIF(SUM(IIF(T2.name IS NOT NULL AND T1.month = 0, 1, 0)) - SUM(IIF(T2.name IS NULL AND T1.month = 0, 1, 0)) > 0, 'YES', 'NO') AS isHigh FROM longest_absense_from_school AS T1 LEFT JOIN disabled AS T2 ON T2.name = T1.name

Database: olympics
Question: Tell the weight of Dagfinn Sverre Aarskog.
SQL: SELECT weight FROM person WHERE full_name = 'Dagfinn Sverre Aarskog'

Database: software_company
Question: Of customers who provide other services, how many are from places where inhabitants are more than 20000?
Evidence: OCCUPATION = 'Other-service'; inhabitants are more than 20000 refer to INHABITANTS_K > 20;
SQL: SELECT COUNT(T2.GEOID) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.OCCUPATION = 'Other-service' AND T2.INHABITANTS_K > 20

Database: sales
Question: How many of the employees have the last name "Ringer" ?
SQL: SELECT COUNT(LastName) FROM Employees WHERE LastName = 'Ringer'

Database: olympics
Question: What is the region id of Christine Jacoba Aaftink?
SQL: SELECT T1.region_id FROM person_region AS T1 INNER JOIN person AS T2 ON T1.person_id = T2.id WHERE T2.full_name = 'Christine Jacoba Aaftink'

Database: coinmarketcap
Question: Please list the names of coins that has been disappeared.
Evidence: has disappeared refers to status = 'extinct'
SQL: SELECT name FROM coins WHERE status = 'extinct'

Database: social_media
Question: Is 3751 the location ID for tweet with ID tw-682714048199311366?
Evidence: "tw-682714048199311366" is the TweetID
SQL: SELECT LocationID FROM twitter WHERE TweetID = 'tw-682714048199311366'

Database: retails
Question: What percentage of customers from the African region is in the household segment?
Evidence: DIVIDE(COUNT(c_custkey where c_mktsegment = 'HOUSEHOLD' and r_name = 'AFRICA'), COUNT(c_custkey where r_name = 'AFRICA')) as percentage;
SQL: SELECT CAST(SUM(IIF(T2.r_name = 'AFRICA', 1, 0)) AS REAL) * 100 / COUNT(T1.n_nationkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey INNER JOIN customer AS T3 ON T1.n_nationkey = T3.c_nationkey WHERE T3.c_mktsegment = 'HOUSEHOLD'

Database: talkingdata
Question: What is the age of the oldest device user?
Evidence: oldest device user refers to MAX(age);
SQL: SELECT MAX(age) FROM gender_age

Database: movie_3
Question: Sherri Rhodes rented a film at 12:27:27 on 2005/7/28, when did she/he return that film?
Evidence: rented at 12:27:27 on 2005/7/28 refers to rental_date = '2005-07-28 12:27:27'
SQL: SELECT T2.return_date FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'SHERRI' AND T1.last_name = 'RHODES' AND T2.rental_date = '2005-07-28 12:27:27'

Database: simpson_episodes
Question: What is the title of episode that has a keyword of 'riot' and 'cake'?
Evidence: "riot" and "cake" are both keyword
SQL: SELECT DISTINCT T1.title FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T2.keyword IN ('riot', 'cake');

Database: regional_sales
Question: What percentage of sell orders on 04/04/2020 were for the state of New York?
Evidence: sales order on 04/04/2020 refers to OrderDate = '4/4/20'; 'New York' is  the City Name; percentage = Divide (Sum(OrderNumber where City Name = 'New York'), Count (OrderNumber)) * 100
SQL: SELECT CAST(SUM(CASE WHEN T2.State = 'New York' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T1.OrderDate = '4/4/20'

Database: movie_3
Question: How many films with the rental rate of $2.99 have the special feature of "Deleted Scenes"?
Evidence: rental rate of $2.99 refers to rental_rate = 2.99; film refers to title
SQL: SELECT COUNT(film_id) FROM film WHERE rental_rate = 2.99 AND special_features = 'Deleted Scenes'

Database: cs_semester
Question: How many students taking a bachelor's degree received an A in all of the courses that they took?
Evidence: bachelor's degree is an undergraduate degree in which type = 'UG'; A refers to an excellent grade in which grade = 'A';
SQL: SELECT COUNT(T2.student_id) FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id WHERE T2.grade = 'A' AND T1.type = 'UG'

Database: authors
Question: List down the author ID of authors with a name of "Peter".
Evidence: "Peter" is the name of author
SQL: SELECT AuthorId FROM PaperAuthor WHERE Name = 'Peter'

Database: retails
Question: How many urgent orders were shipped the next day?
Evidence: the order is urgent if o_orderpriority = '1-URGENT'; shipped the next day refers to SUBTRACT(l_shipdate, o_orderdate) = 1;
SQL: SELECT COUNT(T2.o_orderkey) FROM lineitem AS T1 INNER JOIN orders AS T2 ON T2.o_orderkey = T1.l_orderkey WHERE JULIANDAY(T1.l_shipdate) - JULIANDAY(T2.o_orderdate) = 1 AND T2.o_orderpriority = '1-URGENT'

Database: social_media
Question: Give the gender of the user who made the highest klout tweet on Wednesdays.
Evidence: highest klout refers to Max(Klout); 'Wednesday' is the Weekday
SQL: SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.Weekday = 'Wednesday' ORDER BY T1.Klout DESC LIMIT 1

Database: movie_3
Question: Please give the full names of all the active staff.
Evidence: full name refers to first_name, last_name; active staff refers to active = 1
SQL: SELECT first_name, last_name FROM staff WHERE active = 1

Database: soccer_2016
Question: Is SuperSport Park located at Centurion?
Evidence: SuperSport Park refers to Venue_Name = 'SuperSport Park'; Centurion refers to City_Name = 'Centurion'
SQL: SELECT T2.City_Name FROM Venue AS T1 INNER JOIN City AS T2 ON T1.City_Id = T2.City_Id WHERE T1.Venue_Name LIKE 'St George%'

Database: simpson_episodes
Question: In the crew, who was born in 1962 in California?
Evidence: born in 1962 refers to year(birthdate) = 1962; in California refers to birth_region = 'California'
SQL: SELECT name FROM Person WHERE SUBSTR(birthdate, 1, 4) = '1962' AND birth_region = 'California';

Database: public_review_platform
Question: Tell the number of "hair removal" Yelp businesses.
Evidence: hair removal refers to category_name = 'Hair Removal';
SQL: SELECT COUNT(T1.category_id) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id WHERE T1.category_name LIKE 'Hair Removal'

Database: retails
Question: What is the account balance of the supplier with the most parts?
Evidence: account balance refers to s_acctbal; the most parts refers to max(count(ps_suppkey))
SQL: SELECT T.s_acctbal FROM ( SELECT T1.s_acctbal, COUNT(T2.ps_suppkey) AS num FROM supplier AS T1 INNER JOIN partsupp AS T2 ON T1.s_suppkey = T2.ps_suppkey GROUP BY T1.s_suppkey ) AS T ORDER BY T.num DESC LIMIT 1