Database: cs_semester
Question: How many research assistants does the female professor with the lowest teaching ability have?
Evidence: research assistant refers to the student who serves for research where the abbreviation is RA; professor with the lowest teaching ability refers to prof_id where teachability = '1';
SQL: SELECT COUNT(T1.student_id) FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id WHERE T2.teachingability = '1' AND T2.gender = 'Female'

Database: college_completion
Question: In Alaska with school count of 1 from year 2011 to 2013, how many of the students are white?
Evidence: Alaska refers to state = 'Alaska'; from year 2011 to 2013 refers to year BETWEEN '2011' AND '2013'; white refers to race = 'W';
SQL: SELECT COUNT(T2.race) FROM state_sector_details AS T1 INNER JOIN state_sector_grads AS T2 ON T2.stateid = T1.stateid WHERE T1.schools_count = 1 AND T2.year BETWEEN 2011 AND 2013 AND T2.race = 'W' AND T1.state = 'Alaska'

Database: codebase_comments
Question: How many more followers in percentage are there for the repository used by solution ID 18 than solution ID19?
Evidence: followers refers to Forks; percentage = divide(SUBTRACT(Forks(Solution.ID = 18), Forks(Solution.ID = 19)), Forks(Solution.ID = 19))*100%
SQL: SELECT CAST((SUM(CASE WHEN T2.Id = 18 THEN T1.Forks ELSE 0 END) - SUM(CASE WHEN T2.Id = 19 THEN T1.Forks ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T2.Id = 19 THEN T1.Forks ELSE 0 END) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId

Database: college_completion
Question: How many students that graduated from Lincoln College in 2011 belong to the cohort type of Bachelor's/equivalent seeking cohort at 4-year institutions?
Evidence: Lincoln College refers to chronname = 'Lincoln College'; in 2011 refers to year = 2011; Bachelor's/equivalent seeking cohort at 4-year institutions refers to cohort = '4y bach';
SQL: SELECT COUNT(T1.unitid) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T1.chronname = 'Lincoln College' AND T2.year = 2011 AND T2.cohort = '4y bach'

Database: beer_factory
Question: Provide the name of the location where transaction no.100885 happened.
Evidence: name of the location refers to LocationName; transaction no. refers to TransactionID; TransactionID = 100885;
SQL: SELECT T2.LocationName FROM `transaction` AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T1.TransactionID = 100885

Database: menu
Question: On the menu with the most dishes, how many dishes were there on its second page?
Evidence: menu with the most dishes refers to menu.id with MAX(dish_count); second page refers to page_number = 2;
SQL: SELECT COUNT(T1.dish_id) FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id WHERE T2.page_number = 2 GROUP BY T3.name ORDER BY T3.dish_count DESC LIMIT 1

Database: olympics
Question: How many Olympic events did Michael Phelps II join in total? Find the percentage of the events where he won a gold medal.
Evidence: DIVIDE(COUNT(event_id where medal_name = 'Gold'), COUNT(event_id)) as percentage where full_name = 'Michael Fred Phelps, II';
SQL: SELECT COUNT(T3.event_id) , CAST(COUNT(CASE WHEN T4.id = '1' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T4.id) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN competitor_event AS T3 ON T2.id = T3.competitor_id INNER JOIN medal AS T4 ON T3.medal_id = T4.id WHERE T1.full_name = 'Michael Fred Phelps, II'

Database: olympics
Question: How many female competitors were from Iran?
Evidence: female competitors refer to person_id where gender = 'F'; from Iran refers to region_name = 'Iran';
SQL: SELECT COUNT(T2.person_id) 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 = 'Iran' AND T3.gender = 'F'

Database: restaurant
Question: At what numbers on 9th Avenue of San Francisco there are restaurants?
Evidence: 9th Avenue refers to street_name = '9th avenue'; San Francisco refers to City = 'san francisco'
SQL: SELECT id_restaurant FROM location WHERE City = 'san francisco' AND street_name = '9th avenue'

Database: bike_share_1
Question: List all trips where bikes were returned at location 37.331415, -121.8932. State the date the bike was borrowed.
Evidence: 37.331415 and -121.8932 are latitude (lat) and longitude (long) coordinates indicating location; returned at refers to end_station_name; the date the bike was borrowed refers to start_date;
SQL: SELECT T2.end_station_name, T2.start_date FROM station AS T1 INNER JOIN trip AS T2 ON T2.end_station_name = T1.name WHERE T1.lat = 37.331415 AND T1.long = -121.8932

Database: software_company
Question: What is the ratio of male and female among the age of teenager when the education is above 10?
Evidence: ratio = DIVIDE(COUNT(SEX = 'Male' where age BETWEEN 13 AND 19 and EDUCATIONNUM > 10),COUNT(SEX = 'Female' where age BETWEEN 13 AND 19 and EDUCATIONNUM > 10));
SQL: SELECT CAST(SUM(CASE WHEN SEX = 'Male' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN SEX = 'Female' THEN 1 ELSE 0 END) FROM Customers WHERE age BETWEEN 13 AND 19 AND EDUCATIONNUM > 10

Database: world
Question: Which country has the smallest surface area?
Evidence: smallest surface area refers to MIN(smallest surface area);
SQL: SELECT Name FROM Country ORDER BY SurfaceArea ASC LIMIT 1

Database: disney
Question: Name the voice actor of the character Calliope in the movie Hercules.
Evidence: Hercules refers to movie = 'Hercules';
SQL: SELECT `voice-actor` FROM `voice-actors` WHERE movie = 'Hercules' AND character = 'Calliope'

Database: regional_sales
Question: What is the highest discount applied by the store located in a city of the state of Colorado whose land area is 111039036.
Evidence: highest discount applied refers to Max(Discount Applied)
SQL: SELECT MAX(T1.`Discount Applied`) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T2.State = 'Colorado' AND T2.`Land Area` = 111039036

Database: cars
Question: What is the name of the most expensive car that was produced by the USA?
Evidence: name of the car refers to car_name; the most expensive refers to max(price); produced by the USA refers to country = 'USA'
SQL: SELECT T4.car_name FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country INNER JOIN data AS T4 ON T4.ID = T1.ID WHERE T3.country = 'USA' ORDER BY T1.price DESC LIMIT 1

Database: cars
Question: Show the origin country of Chevrolet Malibu.
Evidence: origin country refers to country; Chevrolet Malibu refers to car_name = 'chevrolet malibu'
SQL: SELECT T3.country FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T1.car_name = 'chevrolet malibu'

Database: public_review_platform
Question: In which year did the user who gave the most number of "5" star reviews join the Yelp?
Evidence: year the user join the Yelp refers to user_yelping_since_year; star reviews refers to review_stars;
SQL: SELECT T2.user_yelping_since_year FROM Reviews AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id WHERE T1.review_stars = 5 GROUP BY T2.user_yelping_since_year ORDER BY COUNT(T1.review_stars) DESC LIMIT 1

Database: software_company
Question: What is the geographic ID and total income per year when the average income is above 3300 dollar.
Evidence: total income per year refers to MULTIPLY(12, INHABITANTS_K, INCOME_K) where INCOME_K > 3300; geographic ID refers to GEOID;
SQL: SELECT GEOID, INHABITANTS_K * INCOME_K * 12 FROM Demog WHERE INCOME_K > 3300