Database: public_review_platform
Question: How many closed businesses that have more than 10 attributes?
Evidence: closed refers to active = 'false'; more than 10 attributes refers to count(attribute_id) > 10
SQL: SELECT COUNT(*) FROM Business WHERE business_id IN ( SELECT T1.business_id FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id WHERE T1.active = 'false' GROUP BY T1.business_id HAVING COUNT(DISTINCT T2.attribute_id) > 10 )

Database: restaurant
Question: What is the review of the restaurant at 8440 Murray Ave?
Evidence: 8440 Murray Ave refers to street_num = 8440 and street_name = 'murray ave'
SQL: SELECT T2.review FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_name = 'murray ave' AND T1.street_num = 8440

Database: retail_complains
Question: Which product received a review from Indianapolis on 2016/10/7?
Evidence: Indianapolis refers to state = 'Indianapolis'; on 2016/10/7 refers to Date = '2013-04-04';
SQL: SELECT T1.Product FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Indianapolis' AND T1.Date = '2016-10-07'

Database: soccer_2016
Question: How many venues are located at Centurion, South Africa?
Evidence: venues are located at Centurion refers to city_name = 'Centurion'; South Africa refers to country_name = 'South Africa'
SQL: SELECT COUNT(T1.Venue_name) FROM Venue AS T1 INNER JOIN City AS T2 ON T1.City_Id = T2.City_Id INNER JOIN Country AS T3 ON T2.Country_Id = T3.Country_Id WHERE T3.country_name = 'South Africa' AND T2.city_name = 'Centurion'

Database: shooting
Question: What is the percentage of subject who are female used the Vehicle as weapon?
Evidence: female refers to gender = 'F'; use Vehicle as weapon refers to subject_weapon = 'Vehicle'; percentage = divide(count(case_number where subject_weapon = 'Vehicle'), count(case_number)) where gender = 'F' * 100%
SQL: SELECT CAST(SUM(T1.subject_weapon = 'Vehicle') AS REAL) * 100 / COUNT(T1.case_number) FROM incidents T1 INNER JOIN subjects T2 ON T1.case_number = T2.case_number WHERE T2.gender = 'F'

Database: public_review_platform
Question: How many businesses are registered in the database under 'Banks & Credit Unions' category?
Evidence: category refers to category_name
SQL: SELECT COUNT(T2.business_id) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id WHERE T1.category_name = 'Banks & Credit Unions'

Database: food_inspection_2
Question: List down the names of the establishments with the highest risk level and failed the inspection.
Evidence: name of establishment refers to dba_name; the highest risk level refers to max(risk_level); failed the inspection refers to results = 'Fail'
SQL: SELECT DISTINCT T1.dba_name FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T1.risk_level = 3 AND T2.results = 'Fail'

Database: books
Question: What percentage of books written by Hirohiko make up the number of books published by Viz Media?
Evidence: "Hirohiko Araki" is the author_name; 'Viz Media' is the publisher_name; percentage = Divide (Count(author_name = 'Hirohiko Araki'), Count(book_id)) * 100
SQL: SELECT CAST(SUM(CASE WHEN T1.author_name = 'Hirohiko Araki' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM author AS T1 INNER JOIN book_author AS T2 ON T2.author_id = T1.author_id INNER JOIN book AS T3 ON T3.book_id = T2.book_id INNER JOIN publisher AS T4 ON T4.publisher_id = T3.publisher_id WHERE T4.publisher_name = 'VIZ Media'

Database: student_loan
Question: What is the name of the student with the longest duration of absence?
Evidence: longest duration of absence refers to MAX(month);
SQL: SELECT name FROM longest_absense_from_school WHERE month = ( SELECT MAX(month) FROM longest_absense_from_school )

Database: human_resources
Question: How many male employees work at the address 450 Peachtree Rd?
Evidence: male employees refers to gender = 'M'
SQL: SELECT COUNT(*) FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T2.address = '450 Peachtree Rd' AND T1.gender = 'M'

Database: law_episode
Question: Which episodes are nominated for an awards but not win?
Evidence: nominated for an award but not win refers to result = 'Nominee'
SQL: SELECT T1.episode FROM Episode AS T1 INNER JOIN Award AS T2 ON T1.episode_id = T2.episode_id WHERE T2.result = 'Nominee'

Database: simpson_episodes
Question: The person named Al Jean achieved the Primetime Emmy Award category in 2009, which episode did AI Jean achieve?
Evidence: in 2009 refers to year = 2009
SQL: SELECT T2.episode_id FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE SUBSTR(T1.year, 1, 4) = '2009' AND T1.person = 'Al Jean' AND T1.award_category = 'Primetime Emmy';

Database: image_and_language
Question: How many object elements are there on average in each image?
Evidence: object elements refers to OBJ_CLASS_ID; average = divide(count(OBJ_CLASS_ID), count(IMG_ID))
SQL: SELECT CAST(COUNT(OBJ_CLASS_ID) AS REAL) / COUNT(DISTINCT IMG_ID) FROM IMG_OBJ

Database: bike_share_1
Question: On 11/3/2013, which stations are often empty? Indicate the names of the stations.
Evidence: time = '11/3/2013'; which stations are empty refers to bikes_available = '0';
SQL: SELECT DISTINCT T1.name FROM station AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.id WHERE T2.bikes_available = 0 AND T2.time LIKE '2013/11/03%'

Database: chicago_crime
Question: Which community has the highest number of neighborhoods?
Evidence: community with highest number of neighborhoods refers to Max(Count(community_area_no)); community refers to community_area_name
SQL: SELECT T1.community_area_name FROM Community_Area AS T1 INNER JOIN Neighborhood AS T2 ON T1.community_area_no = T2.community_area_no ORDER BY T2.community_area_no DESC LIMIT 1

Database: student_loan
Question: List down the student names who did not file for bankruptcy.
Evidence: students name who did not file a bankruptcy refers to person.name who are NOT in filed_for_bankrupcy.name;
SQL: SELECT name FROM person WHERE name NOT IN ( SELECT name FROM filed_for_bankrupcy )

Database: movie
Question: What is the net worth of the actor starred in Misery who has a height ranging from 60 to 70 inches tall?
Evidence: Misery refers to Title = 'Misery'; height ranging from 60 to 70 inches refers to Height (Inches) BETWEEN 60 and 70
SQL: SELECT T3.NetWorth FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.Title = 'Misery' AND T3.`Height (Inches)` BETWEEN 60 AND 70 AND T3.Gender = 'Male'

Database: books
Question: List every book that Ursola Purdy has ordered.
Evidence: book refers to title
SQL: SELECT T1.title 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 = 'Ursola' AND T4.last_name = 'Purdy'

Database: video_games
Question: Provide the games that can be played on the SCD platform.
Evidence: game refers to game_name; on the SCD platform refers to platform_name = 'SCD'
SQL: SELECT T4.game_name FROM game_platform AS T1 INNER JOIN platform AS T2 ON T1.platform_id = T2.id INNER JOIN game_publisher AS T3 ON T1.game_publisher_id = T3.id INNER JOIN game AS T4 ON T3.game_id = T4.id WHERE T2.platform_name = 'SCD'

Database: retail_complains
Question: How many complaints on credit cards in the year 2016 were filed by male clients?
Evidence: credit cards refers to Product = 'Credit card'; 2016 refers to year(Date received) = 2016; male refers to sex = 'Male';
SQL: SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) = '2016' AND T1.sex = 'Male' AND T2.Product = 'Credit card'