Database: movie_3
Question: Tally the full names of actors in the film "Alabama Devil."
Evidence: full name refers to first_name, last_name; "Alabama Devil" refers to title = 'ALABAMA DEVIL'
SQL: SELECT T2.first_name, T2.last_name FROM film_actor AS T1 INNER JOIN actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T1.film_id = T3.film_id WHERE T3.title = 'ALABAMA DEVIL'

Database: retails
Question: How many customers who are not in debt ordered an urgent order?
Evidence: customers who are not in debt refer to c_custkey where c_acctbal > 0; the order is urgent if o_orderpriority = '1-URGENT' ;
SQL: SELECT COUNT(T2.c_custkey) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_acctbal > 0 AND T1.o_orderpriority = '1-URGENT'

Database: ice_hockey_draft
Question: What is the height of David Bornhammar in inches?
Evidence: heigh in inches refers to height_in_inch;
SQL: SELECT T2.height_in_inch FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T1.PlayerName = 'David Bornhammar'

Database: menu
Question: How many dishes are included in the menu page ID 144?
Evidence: FALSE;
SQL: SELECT COUNT(*) FROM MenuItem WHERE menu_page_id = 144

Database: soccer_2016
Question: List down the ID of toss winners who decided to bat after winning the "toss of the coin".
Evidence: decided to bat refers to Toss_Decide = 2; ID of toss winners refers to Toss_winner
SQL: SELECT Toss_Winner FROM Match WHERE Toss_Decide = 2

Database: address
Question: State the county for Arecibo City.
Evidence: "Arecibo" is the city
SQL: SELECT DISTINCT T1.county FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Arecibo'

Database: social_media
Question: Please list the texts of all the tweets posted by male users from Buenos Aires.
Evidence: "Buenos Aires" is the City; male user refers to Gender = 'Male'
SQL: SELECT T1.text FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID INNER JOIN user AS T2 ON T2.UserID = T1.UserID INNER JOIN user AS T3 ON T1.UserID = T3.UserID WHERE T2.City = 'Buenos Aires' AND T3.Gender = 'Male'

Database: language_corpus
Question: How many Catalan-language Wikipedia pages are there overall?
Evidence: Catalan-language refers to lang = 'ca';
SQL: SELECT pages FROM langs WHERE lang = 'ca'

Database: food_inspection
Question: What is the average scores of Tiramisu Kitchen in all inspections?
Evidence: avg(score);
SQL: SELECT AVG(T1.score) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Tiramisu Kitchen'

Database: public_review_platform
Question: How many businesses id are rated more than 4?
Evidence: rated more than 4 refers to stars > 4;
SQL: SELECT COUNT(business_id) FROM Business WHERE stars > 4

Database: olympics
Question: What is the average age of the athletes from the United States of America who competed in the 2016 Summer Olympics?
Evidence: AVG(age) where games_name = '2016 Summer' and region_name = 'USA';
SQL: SELECT AVG(T2.age) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person_region AS T3 ON T2.person_id = T3.person_id INNER JOIN noc_region AS T4 ON T3.region_id = T4.id WHERE T1.games_name = '2016 Summer' AND T4.region_name = 'USA'

Database: retails
Question: Please list all the brands that contain a part under the type "promo brushed steel".
Evidence: brand refers to p_brand; type "promo brushed steel" refers to p_type = 'PROMO BRUSHED STEEL'
SQL: SELECT p_brand FROM part WHERE p_type = 'PROMO BRUSHED STEEL'

Database: movie_3
Question: How many English films have a duration of over 50 minutes and the cost of replacement are under 10.99?
Evidence: English is a name of a language; duration of over 50 minutes refers to length > 50; cost of replacement are under 10.99 refers to replacement_cost < 10.99
SQL: SELECT COUNT(T1.film_id) FROM film AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE T2.name = 'English' AND T1.length > 50 AND T1.replacement_cost < 10.99

Database: legislator
Question: To which current legislator does twitter ID234128524 belong? Please give his or her full official name.
Evidence: full official name refers to official_full_name
SQL: SELECT T1.official_full_name FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T2.twitter_id = 234128524

Database: movies_4
Question: Show the total number of keywords of the movie "I Hope They Serve Beer in Hell".
Evidence: "I Hope They Serve Beer in Hell" refers to title = 'I Hope They Serve Beer in Hell';
SQL: SELECT COUNT(T2.keyword_id) FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title = 'I Hope They Serve Beer in Hell'

Database: university
Question: How many universities have no less than 20,000 female students in 2016? Identify how many of the said universities are located in the United States of America.
Evidence: have no less than 20,000 female students refers to DIVIDE(MULTIPLY(pct_female_students, num_students), 100) > 20000; in 2016 refers to year = 2016; located in the United States of America refers to country_name = 'United States of America'
SQL: SELECT COUNT(*) , SUM(CASE WHEN T3.country_name = 'United States of America' THEN 1 ELSE 0 END) AS nums_in_usa FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T2.year = 2016 AND T2.num_students * T2.pct_female_students / 100 > 20000

Database: chicago_crime
Question: What was the major type of crime that happened in the Rogers Park community area?
Evidence: "Rogers Park" is the community_area_name; major type of crime refers to title
SQL: SELECT T1.fbi_code_no, T1.title FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no INNER JOIN Community_Area AS T3 ON T2.community_area_no = T3.community_area_no WHERE T3.community_area_name = 'Rogers Park' GROUP BY T1.fbi_code_no, T1.title

Database: public_review_platform
Question: Calculate difference between business that have the highest number of reviews and business that have the lowest number of reviews.
Evidence: highest number of reviews refers to SUBTRACT(MAX(COUNT(business_id), MIN(COUNT(business_id))))
SQL: SELECT ( SELECT COUNT(business_id) FROM Reviews GROUP BY business_id ORDER BY COUNT(business_id) DESC LIMIT 1 ) - ( SELECT COUNT(business_id) FROM Reviews GROUP BY business_id ORDER BY COUNT(business_id) ASC LIMIT 1 ) AS DIFF

Database: books
Question: List all the authors who wrote fewer pages than the average.
Evidence: author refers to author_name; who wrote fewer pages than the average refers to num_pages < AVG(num_pages)
SQL: SELECT T3.author_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T1.num_pages < ( SELECT AVG(num_pages) FROM book )

Database: image_and_language
Question: Calculate the average of object samples for the image.
Evidence: DIVIDE(COUNT(OBJ_SAMPLE_ID), COUNT(IMG_ID));
SQL: SELECT CAST(COUNT(OBJ_SAMPLE_ID) AS REAL) / COUNT(DISTINCT IMG_ID) FROM IMG_OBJ

Database: simpson_episodes
Question: List the title of the episode with stars greater than the 70% of average stars of all episodes.
Evidence: stars greater than the 70% of average stars refers to stars > multiply(avg(stars), 0.7)
SQL: SELECT DISTINCT T1.title FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T2.stars > 0.7 * ( SELECT AVG(stars) FROM Vote );