Database: address
Question: Among the postal points in California, calculate the percentage of them in post office types.
Evidence: DIVIDE(COUNT(zip_code where type = 'Post Office'), COUNT(zip_code)) as percentage where name = 'California';
SQL: SELECT CAST(COUNT(CASE WHEN T2.type = 'Post Office' THEN T2.zip_code ELSE NULL END) AS REAL) * 100 / COUNT(T2.zip_code) FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'California'

Database: public_review_platform
Question: Based on all user compliments, find the percentage of low number of compliments on all compliments ID.
Evidence: low number of compliments refers to number_of_compliments = 'Low'; percentage refers to DIVIDE(COUNT(number_of_compliments = 'Low'), COUNT(user_id)) * 100
SQL: SELECT CAST(SUM(CASE WHEN number_of_compliments = 'Low' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(user_id) FROM Users_compliments

Database: retail_complains
Question: Please calculate the number of clients by each division.
SQL: SELECT T2.division, COUNT(T2.division) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id GROUP BY T2.division

Database: authors
Question: Identify by publication year in the paper database all journals that don't have short name.
Evidence: don't have short name refers to ShortName is NULL OR ShortName = ''
SQL: SELECT DISTINCT T2.Year, FullName FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.ShortName = ''

Database: legislator
Question: For which state did current legislator Sherrod Brown serve during his term that started on 1993/1/5?
Evidence: Sherrod Brown is an full official name; started on 1993/1/5 refers to start = '1993-01-05';
SQL: SELECT T1.state FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.start = '1993-01-05' AND T2.official_full_name = 'Sherrod Brown'

Database: app_store
Question: Which education App has the worst rating and state the translated review if available.
Evidence: education App refers to Category = 'EDUCATION'; worst rated app refers to Rating = 1;
SQL: SELECT T1.App, T2.Translated_Review FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Category = 'EDUCATION' GROUP BY T1.App, T2.Translated_Review ORDER BY T1.Rating ASC LIMIT 1

Database: shakespeare
Question: How many "all" character names have the "all" abbreviation?
Evidence: character names refers to CharName；"all" abbreviation refers to Abbrev = 'all'
SQL: SELECT COUNT(id) FROM characters WHERE Abbrev = 'All'

Database: movie_3
Question: Among the films starring PENELOPE GUINESS, how many of them are in English?
Evidence: "English" is the name of language
SQL: SELECT COUNT(T3.film_id) FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id INNER JOIN language AS T4 ON T3.language_id = T4.language_id WHERE T4.name = 'English' AND T1.first_name = 'PENELOPE' AND T1.last_name = 'GUINESS'

Database: synthea
Question: State description of medication taken by Joe Homenick.
Evidence: description of medication refers to medications.DESCRIPTION;
SQL: SELECT T1.DESCRIPTION FROM medications AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.first = 'Joye' AND T2.last = 'Homenick'

Database: university
Question: How many students did Harvard University have in 2011?
Evidence: in 2011 refers to year 2011; Harvard University refers to university_name = 'Harvard University';
SQL: SELECT T1.num_students FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T2.university_name = 'Harvard University' AND T1.year = 2011

Database: simpson_episodes
Question: How many award winners are from the USA?
Evidence: award winner refers to result = 'Winner'; 'USA' is the birth_country
SQL: SELECT COUNT(*) FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T1.birth_country = 'USA' AND T2.result = 'Winner';

Database: university
Question: Among the universities in United States of America, what is the percentage of female students in year 2016?
Evidence: female students refers to DIVIDE(MULTIPLY(num_students, pct_female_students), 100); in United States of America refers to country_name = 'United States of America'; percentage refers to DIVIDE(SUM(DIVIDE(MULTIPLY(num_students, pct_female_students), 100)), SUM(num_students))
SQL: SELECT SUM(CAST(T2.pct_female_students * T2.num_students AS REAL) / 100) * 100 / SUM(T2.num_students) 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 T3.country_name = 'United States of America' AND T2.year = 2016

Database: beer_factory
Question: Between Sac State Union and Sac State American River Courtyard, which location sold the most Dog n Suds root beer?
Evidence: Between Sac State Union and Sac State American River Courtyard refers to LocationName IN('Sac State American River Courtyard', 'Sac State Union'); Dog n Suds refers to BrandName = 'Dog n Suds'; sold the most root beer refers to MAX(COUNT(BrandID));
SQL: SELECT T3.LocationName FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID INNER JOIN location AS T3 ON T1.LocationID = T3.LocationID WHERE T2.BrandName = 'Dog n Suds' AND T3.LocationName IN ('Sac State American River Courtyard', 'Sac State Union') GROUP BY T1.LocationID ORDER BY COUNT(T1.BrandID) DESC LIMIT 1

Database: superstore
Question: What product category got the highest profit in the south superstore?
Evidence: highest profit refers to MAX(Profit)
SQL: SELECT T2.Category FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` ORDER BY T1.Profit DESC LIMIT 1

Database: student_loan
Question: Among all students, calculate the percentage of disabled students.
Evidence: percentage = CONCAT(DIVIDE(MULTIPLY(COUNT(disabled.name), 100), (COUNT(person.name that is not in disabled.name))),'%');
SQL: SELECT CAST(COUNT(T2.name) AS REAL) * 100 / COUNT(T1.name) FROM person AS T1 LEFT JOIN disabled AS T2 ON T2.name = T1.name

Database: synthea
Question: How many care plans has Mrs. Norman Berge taken?
SQL: SELECT COUNT(T2.PATIENT) FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mrs.' AND T1.first = 'Norman' AND T1.last = 'Berge'

Database: codebase_comments
Question: Give the tokenized name for the method "Supay.Irc.Messages.KnockMessage.GetTokens".
SQL: SELECT NameTokenized FROM Method WHERE Name = 'Supay.Irc.Messages.KnockMessage.GetTokens'

Database: movie_platform
Question: What's the description for the movie list "Short and pretty damn sweet"?
Evidence: Short and pretty damn sweet is list_title; description refers to list_description;
SQL: SELECT list_description FROM lists WHERE list_title = 'Short and pretty damn sweet'

Database: movielens
Question: How many 35-year-old female users gave the movie 1711133 a rating of 3?
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.rating = 3 AND T2.movieid = '1711133' AND T1.age = 35 AND T1.u_gender = 'F'

Database: world_development_indicators
Question: From 1968 to 1970, what are indicator names whose license type is open and values are less than 100?
Evidence: From 1968 to 1970 refers to Year between '1968' and '1970'; values are less than 100 imply Value<100;
SQL: SELECT DISTINCT T1.IndicatorName FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName WHERE T1.Year >= 1968 AND T1.Year < 1971 AND T2.LicenseType = 'Open' AND T1.Value < 100