Database: world
Question: How many countries have Socialistic Republic form of government?
Evidence: Socialistic Republic form of government refers to GovernmentForm = 'Socialistic Republic';
SQL: SELECT COUNT(Code) FROM Country WHERE GovernmentForm = 'Socialistic Republic'

Database: public_review_platform
Question: Which city has the most businesses whose attribute is full_bar?
Evidence: most business refers to MAX(business_id); full_bar refers to attribute_value = 'full_bar';
SQL: SELECT T1.city FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id WHERE T2.attribute_value LIKE 'full_bar' GROUP BY T1.city

Database: chicago_crime
Question: How many crimes against society happened in the Wentworth district according to the FBI?
Evidence: "Wentworth" is the district_name; crime against society refers to crime_against = 'Society"
SQL: SELECT SUM(CASE WHEN T1.crime_against = 'Society' THEN 1 ELSE 0 END) FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T2.fbi_code_no = T1.fbi_code_no INNER JOIN District AS T3 ON T3.district_no = T2.district_no WHERE T3.district_name = 'Wentworth'

Database: olympics
Question: Calculate the average weight of male athletes from Tonga.
Evidence: AVG(weight) where region_name = 'Tonga' and gender = 'M';
SQL: SELECT AVG(T3.weight) FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Tonga' AND T3.gender = 'M'

Database: olympics
Question: What is the average height of the male Olympic competitors from Finland?
Evidence: DIVIDE(SUM(height), COUNT(id)) where region_name = 'Finland' and gender = 'M';
SQL: SELECT AVG(T3.height) FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Finland' AND T3.gender = 'M'

Database: movie_platform
Question: What's the cover image of the user who created the movie list 'Georgia related films'?
Evidence: Play it cool' is list_title; cover image of user refers to user_cover_image_url;
SQL: SELECT T1.user_cover_image_url FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_title LIKE 'Georgia related films'

Database: student_loan
Question: Calculate the average duration of absense of disabled male students.
Evidence: average duration = DIVIDE(SUM(month), COUNT(month)); duration of absence refers to month; disabled male students refers to disabled.name who are IN male.name;
SQL: SELECT AVG(T1.month) FROM longest_absense_from_school AS T1 INNER JOIN disabled AS T2 ON T2.name = T1.name INNER JOIN male AS T3 ON T3.name = T2.name

Database: image_and_language
Question: Please list the IDs of the object samples in class no. 297 in image no.1.
Evidence: IDs of the object samples refers to OBJ_SAMPLE_ID; class no. 297 in image no.1 refers to IMG_ID = 1 and OBJ_CLASS_ID = 297
SQL: SELECT OBJ_SAMPLE_ID FROM IMG_OBJ WHERE IMG_ID = 1 AND OBJ_CLASS_ID = 297

Database: language_corpus
Question: Which word has the most occurrences within the same page of wikipedia about Catalan language?
Evidence: most occurrences refers to max(occurrences)
SQL: SELECT T1.word FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid WHERE T2.occurrences = ( SELECT MAX(occurrences) FROM pages_words )

Database: movies_4
Question: What percentage of movies that came from Japan belong in the 'animation' genre?
Evidence: from Japan refers to country_name = 'Japan'; in the 'animation' genre refers to genre_name = 'animation'; percentage = divide(sum(movie_id) when genre_name = 'animation', count(movie_id)) as percentage
SQL: SELECT CAST(COUNT(CASE WHEN T4.genre_name = 'Animation' THEN T1.movie_id ELSE NULL END) AS REAL) * 100 / COUNT(T1.movie_id) FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN production_COUNTry AS T3 ON T1.movie_id = T3.movie_id INNER JOIN genre AS T4 ON T2.genre_id = T4.genre_id INNER JOIN COUNTry AS T5 ON T3.COUNTry_id = T5.COUNTry_id WHERE T5.COUNTry_name = 'Japan'

Database: college_completion
Question: Give the cohort name for the school with biggest cohort size.
Evidence: biggest cohort size refers to MAX(cohort_size); cohort = '4y bach' means bachelor's or equivalent-seeking cohort at 4-year institutions; cohort = '4y other' means students seeking another type of degree or certificate at a 4-year institution; cohort = '2y all' means degree-seeking students at 2-year institutions;
SQL: SELECT DISTINCT T1.chronname FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.cohort_size = ( SELECT MAX(T1.cohort_size) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid )

Database: retails
Question: Please indicate the names of customers whose orders are eligible for 10% discount with order dates between 1/1/1994 and 1/1/1995.
Evidence: customer name refers to c_name; 10% discount refers to l_discount = 0.1; order dates between 1/1/1994 and 1/1/1995 refers to year(o_orderdate) = 1994 OR o_orderdate = '1995-01-01'
SQL: SELECT T3.c_name FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey INNER JOIN customer AS T3 ON T1.o_custkey = T3.c_custkey WHERE T2.l_discount = 0.1 AND STRFTIME('%Y', T1.o_orderdate) BETWEEN 1994 AND 1995

Database: video_games
Question: List down the name of strategy games.
Evidence: strategy games refers to game_name WHERE genre_name = 'Strategy';
SQL: SELECT T1.game_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T2.genre_name = 'Strategy'

Database: donor
Question: From the total amount of donation to projects, what is the percentage of the amount is for school projects located in the rural area?
Evidence: located in the rural area refers to school_metro = 'rural'; percentage = divide(sum(donation_to_project), sum(donation_to_project where school_metro = 'rural'))*100%
SQL: SELECT CAST(SUM(CASE WHEN T2.school_metro = 'rural' THEN T1.donation_to_project ELSE 0 END) AS REAL) * 100 / SUM(donation_to_project) FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid

Database: world_development_indicators
Question: For the country that has notes on the indicator Inflation, consumer prices, in which region is it in?
Evidence: indicator Inflation, consumer prices refers to IndicatorName = 'Inflation, consumer prices (annual %)'
SQL: SELECT T1.Region FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode INNER JOIN Series AS T3 ON T2.Seriescode = T3.SeriesCode WHERE T3.IndicatorName = 'Inflation, consumer prices (annual %)'

Database: car_retails
Question: Among all orders shipped, calculate the percentage of orders shipped at least 3 days before the required date.
Evidence: Orders shipped refer to status = 'Shipped'; at least 3 days before the required date refers to SUBTRACT(shippedDate, requiredDate)>3; DIVIDE(COUNT(orderNumber where SUBTRACT(shippedDate, requiredDate)>3), (COUNT(orderNumber) as percentage;
SQL: SELECT COUNT(CASE WHEN JULIANDAY(t1.shippeddate) - JULIANDAY(t1.requireddate) > 3 THEN T1.customerNumber ELSE NULL END) FROM orders AS T1 INNER JOIN orderdetails AS T2 ON T1.orderNumber = T2.orderNumber WHERE T1.status = 'Shipped'

Database: disney
Question: Determine the average gross for Disney's PG-13-rated action movies.
Evidence: DIVIDE(SUM(total_gross where genre = 'Action' and MPAA_rating = 'PG-13'), COUNT(movie_title where genre = 'Action' and MPAA_rating = 'PG-13'));
SQL: SELECT SUM(CAST(REPLACE(trim(total_gross, '$'), ',', '') AS REAL)) / COUNT(movie_title) FROM movies_total_gross WHERE MPAA_rating = 'PG-13'