Database: image_and_language
Question: Give the number of samples in image no.2377985 whose attribute is electrical.
Evidence: number of samples refers to OBJ_SAMPLE_ID; image no.2377985 refers to IMG_ID = 2377985; attribute is electrical refers to ATT_CLASS = 'electrical'
SQL: SELECT SUM(CASE WHEN T2.ATT_CLASS = 'white' THEN 1 ELSE 0 END) FROM IMG_OBJ_ATT AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.IMG_ID = 2347915

Database: world_development_indicators
Question: Among the low income countries, which country has the lowest fertility rate?
Evidence: fertility rate refers to IndicatorName = 'Adolescent fertility rate (births per 1,000 women ages 15-19)'; lowest refers to MIN(Value); IncomeGroup = 'Low income';
SQL: SELECT T2.CountryName FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IncomeGroup = 'Low income' AND T2.IndicatorName = 'Adolescent fertility rate (births per 1,000 women ages 15-19)' ORDER BY T2.Value LIMIT 1

Database: law_episode
Question: List out all award titles nominated for episode 20.
Evidence: award title refers to title; nominated refers to result = 'Winner' or result = 'Nominee'
SQL: SELECT T2.award FROM Episode AS T1 INNER JOIN Award AS T2 ON T1.episode_id = T2.episode_id WHERE T1.episode = 20 AND T2.result IN ('Winner', 'Nominee')

Database: student_loan
Question: Provide the enlisted organizations of student160 and status of his/her payment due.
Evidence: enlisted organizations refers to organ; student160 is a name of student; status of his or her payment due is mentioned in no_payment_due; bool = 'pos' means the student has payment due; bool = 'neg' means the student has no payment due;
SQL: SELECT T1.organ, T2.bool FROM enlist AS T1 INNER JOIN no_payment_due AS T2 ON T2.name = T1.name WHERE T1.name = 'student160'

Database: video_games
Question: How many games can be played on the Wii platform?
Evidence: on the Wii platform refers to platform_name = 'Wii'
SQL: SELECT COUNT(T1.id) FROM game_platform AS T1 INNER JOIN platform AS T2 ON T1.platform_id = T2.id WHERE T2.platform_name = 'Wii'

Database: car_retails
Question: How many customers have a credit limit of not more than 100,000 and which customer made the highest total payment amount for the year 2004?
Evidence: creditLimit < = 100000; total payment amount refers to amount; highest total payment amount refers to MAX(amount); year(paymentDate) = '2004';
SQL: SELECT ( SELECT COUNT(customerNumber) FROM customers WHERE creditLimit <= 100000 AND customerNumber IN ( SELECT customerNumber FROM payments WHERE STRFTIME('%Y', paymentDate) = '2004' ) ), T1.customerName FROM customers AS T1 INNER JOIN payments AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.creditLimit <= 100000 AND STRFTIME('%Y', T2.paymentDate) = '2004' GROUP BY T1.customerNumber, T1.customerName ORDER BY SUM(T2.amount) DESC LIMIT 1

Database: authors
Question: How many publications were published by author named 'Howard F. Lipson'?
Evidence: 'Howard F. Lipson' is the name of author
SQL: SELECT COUNT(PaperId) FROM PaperAuthor WHERE Name = 'Howard F. Lipson'

Database: shakespeare
Question: Gives the average number of chapters in Shakespeare's 1599 work.
Evidence: 1599 work refers to Date = '1599'; average number refers to divide(count(chapters.id), count(works.id))
SQL: SELECT CAST(COUNT(T1.id) AS REAL) / COUNT(DISTINCT T2.id) FROM chapters AS T1 INNER JOIN works AS T2 ON T1.work_id = T2.id WHERE T2.Date = '1599'

Database: chicago_crime
Question: Among all the incidents with no arrest made, what is the percentage of them having a generic description of "BATTERY" in the IUCR classification?
Evidence: incident with no arrest made refers to arrest = 'FALSE'; general description refers to primary_description; "BATTERY" is the primary_description; percentage = Divide (Count(iucr_no where primary_description = 'BATTERY'), Count(iucr_no)) * 100
SQL: SELECT CAST(SUM(CASE WHEN T1.primary_description = 'BATTERY' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*)FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T1.iucr_no = T2.iucr_no WHERE T2.arrest = 'FALSE'

Database: law_episode
Question: How many people gave the most enjoyed episode a 10-star rating?
Evidence: the most enjoyed refers max(rating); 10-star refers to stars = 10
SQL: SELECT COUNT(T1.episode_id) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id WHERE T2.stars = 10

Database: world
Question: How many percent of the population of China used Chinese as their language?
Evidence: percent refers to Percentage; China is a name of country; use Chinese as their language refers to Language = 'Chinese';
SQL: SELECT T2.Percentage FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'China' AND T2.Language = 'Chinese'

Database: movie_3
Question: Calculate the total rental rate for animation film titles.
Evidence: animation film refers to category.name = 'Animation'; total rental rate = sum(rental_rate)
SQL: SELECT SUM(T1.rental_rate) FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.`name` = 'Animation'

Database: synthea
Question: Among the patients who were immunized with meningococcal MCV4P, how many have viral sinusitis disorder after getting the immunization?
Evidence: immunized with meningococcal MCV4P refers to DESCRIPTION = 'meningococcal MCV4P' from immunizations; viral sinusitis disorder refers to DESCRIPTION = 'Viral sinusitis (disorder)' from conditions;
SQL: SELECT COUNT(DISTINCT T1.patient) FROM immunizations AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T1.DESCRIPTION = 'meningococcal MCV4P' AND T2.DESCRIPTION = 'Viral sinusitis (disorder)'

Database: human_resources
Question: Write down the full name, performance status and located city of the employee who's social security number is "767-74-7373".
Evidence: full name = firstname, lastname; ssn = '767-74-7373'
SQL: SELECT T1.firstname, T1.lastname, T2.state, T2.locationcity FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T1.ssn = '767-74-7373'

Database: public_review_platform
Question: Provide name of businesses whose category is pets and are still opened after 9PM.
Evidence: category refers to category_name; open after 9pm refers to closing_time > '9PM';
SQL: SELECT T3.business_id FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id INNER JOIN Business_Hours AS T4 ON T3.business_id = T4.business_id WHERE T4.closing_time > '9PM' AND T1.category_name LIKE 'Pets'

Database: soccer_2016
Question: Calculate the average runs scored during the first half of all first innings.
Evidence: first half refers to 1 < Over_Id and Over_Id < 25; average = divide(sum(Over_Id) when 1 < Over_Id and Over_Id < 25, sum(Runs_Scored)) as percentage; first innings refers to Innings_No = 1
SQL: SELECT CAST(SUM(CASE WHEN 1 < Over_Id AND Over_Id < 25 THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(Runs_Scored) FROM Batsman_Scored WHERE Innings_No = 1

Database: codebase_comments
Question: For the method which got the tokenized name as 'interp parser expr', what is the processed time for its solution?
Evidence: tokenized name refers to NameTokenized; NameTokenized = 'interp parser expr'; processed time for its solution refers to ProcessedTime;
SQL: SELECT T1.ProcessedTime FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized = 'interp parser expr'