Database: retail_complains
Question: What are the complaint id of client who were born in 1931?
Evidence: in 1931 refers to year = 1931
SQL: SELECT T2.`Complaint ID` FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.year = 1931

Database: public_review_platform
Question: Among highest quality user of under ID 100, mention compliment type which got highest compliment number and user's followers.
Evidence: highest quality user refers to number_of_compliments = 'Uber'; user of under ID 100 refers to user_id < 100 ;
SQL: SELECT T1.compliment_type, T3.user_fans FROM Compliments AS T1 INNER JOIN Users_Compliments AS T2 ON T1.compliment_id = T2.compliment_id INNER JOIN Users AS T3 ON T2.user_id = T3.user_id WHERE T2.number_of_compliments = 'Uber' AND T2.user_id < 100

Database: movies_4
Question: What is the keyword ID of the movie with the title of "Sin City"?
Evidence: title of "Sin City" refers to title = 'Sin City'
SQL: SELECT T2.keyword_id FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title = 'Sin City'

Database: food_inspection_2
Question: List down the address of employees who did inspection dated 11/5/2010.
Evidence: dated 11/5/2010 refers to inspection_date = '2010-11-05'
SQL: SELECT DISTINCT T1.address FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.inspection_date = '2010-11-05'

Database: movie_3
Question: How many customers are from the city of Lethbridge?
Evidence: customer refers to customer_id
SQL: SELECT COUNT(T3.customer_id) FROM city AS T1 INNER JOIN address AS T2 ON T1.city_id = T2.city_id INNER JOIN customer AS T3 ON T2.address_id = T3.address_id WHERE T1.city = 'Lethbridge'

Database: trains
Question: What is the percentage of all the trains with at least 4 cars? List the directions of the said trains.
Evidence: at least 4 cars refers to trailPosi > = 4; calculation = MULTIPLY(DIVIDE(count(trailPosi > = 4 then id), count(id)), 100)
SQL: SELECT CAST(COUNT(CASE WHEN T2.trailPosi >= 4 THEN T1.id ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM trains AS T1 INNER JOIN ( SELECT train_id, MAX(position) AS trailPosi FROM cars GROUP BY train_id ) AS T2 ON T1.id = T2.train_id UNION ALL SELECT T1.direction FROM trains AS T1 INNER JOIN ( SELECT train_id, MAX(position) AS trailPosi FROM cars t GROUP BY train_id ) AS T2 ON T1.id = T2.train_id AND T2.trailPosi >= 4

Database: retail_world
Question: Indicate the category name of the product name with the highest units on order.
SQL: SELECT T2.CategoryName FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.UnitsOnOrder = ( SELECT MAX(T1.UnitsOnOrder) FROM Products )

Database: movies_4
Question: Among the zero-budget movie titles, which one has made the highest revenue?
Evidence: zero-budget refers to budget = 0; highest revenue refers to max(revenue)
SQL: SELECT title FROM movie WHERE budget = 0 ORDER BY revenue DESC LIMIT 1

Database: retail_world
Question: List down the territory IDs, descriptions and region description which are under the in-charge of Nancy Davolio,
Evidence: descriptions refers to TerritoryDescription; region refers to RegionDescription
SQL: SELECT T3.RegionID, T3.TerritoryDescription, T4.RegionDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID INNER JOIN Region AS T4 ON T3.RegionID = T4.RegionID WHERE T1.LastName = 'Davolio' AND T1.FirstName = 'Nancy'

Database: cs_semester
Question: Among research postgraduate students, give the name of the course with the student satisfaction value of 1.
Evidence: research postgraduate students refers to type = 'RPG'; name of the course refers to name; satisfaction refers to sat; sat = 1;
SQL: SELECT T3.name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T2.sat = 1 AND T1.type = 'RPG'

Database: movie_3
Question: What is the full name of the customer who rented the highest number of movies of all time?
Evidence: full name refers to first_name, last_name; customer who rented the most film refers to Max(count(rental_id))
SQL: SELECT T.first_name, T.last_name FROM ( SELECT T2.first_name, T2.last_name, COUNT(T1.rental_id) AS num FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.first_name, T2.last_name ) AS T ORDER BY T.num DESC LIMIT 1

Database: app_store
Question: What are the content ratings for the apps that have "gr8" in their comments?
Evidence: app with gr8 in their comments refers to Translated_Review LIKE '%gr8%';
SQL: SELECT DISTINCT T1.`Content Rating` FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Translated_Review LIKE '%gr8%'

Database: student_loan
Question: How many students enlisted in the Navy?
Evidence: Navy refers to organ = 'navy';
SQL: SELECT COUNT(name) FROM enlist WHERE organ = 'navy'

Database: cs_semester
Question: Provide the number of students enrolled in the "Statistical Learning" course.
SQL: SELECT COUNT(T2.student_id) FROM course AS T1 INNER JOIN registration AS T2 ON T1.course_id = T2.course_id WHERE T1.name = 'Statistical learning'

Database: simpson_episodes
Question: List down the rating of episodes that were produced by Jason Bikowski.
Evidence: produced by Jason Bikowski refers to person = 'Jason Bikowski'
SQL: SELECT T1.rating FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.person = 'Jason Bikowski';

Database: shakespeare
Question: How many chapters does the character Demetrius show in the story?
Evidence: character Demetrius refers to CharName = 'Demetrius'
SQL: SELECT COUNT(DISTINCT T2.chapter_id) FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.CharName = 'Demetrius'

Database: world_development_indicators
Question: Name the country with fastest growth in adjusted net national income in 1980 and state the currency used by this country.
Evidence: fastest growth refers to MAX(Value); IndicatorName = 'Adjusted net national income (annual % growth)'; Year = '1980'; currency refers to CurrencyUnit;
SQL: SELECT T2.countryname, T1.CurrencyUnit FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IndicatorName = 'Adjusted net national income (annual % growth)' AND T2.Year = 1980 AND T1.CurrencyUnit != '' ORDER BY T2.Value DESC LIMIT 1

Database: student_loan
Question: How many employed disabled students have zero absences?
Evidence: employed students refers to disabled.name who are NOT in unemployed.name; zero absences refers to month = 0;
SQL: SELECT COUNT(T1.name) FROM longest_absense_from_school AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name INNER JOIN unemployed AS T3 ON T3.name = T2.name WHERE T1.month = 0

Database: disney
Question: How many restricted horror movies were released between 1/1/1990 to 12/31/2015?
Evidence: Restricted refers to MPAA_rating = 'R'; horror refers to genre = 'Horror'; released between 1/1/1990 to 12/31/2015 refers to (cast(SUBSTR(release_date, instr(release_date, ', ') + 1) as int) between 1990 and 2015);
SQL: SELECT COUNT(movie_title) FROM movies_total_gross WHERE MPAA_rating = 'R' AND genre = 'Horror' AND CAST(SUBSTR(release_date, INSTR(release_date, ', ') + 1) AS int) BETWEEN 1990 AND 2015

Database: authors
Question: List author affiliation for papers whose topic is Quantum Physics.
Evidence: topic is Quantum Physics refers to Keyword = 'Quantum Physics'
SQL: SELECT T2.Affiliation FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Keyword = 'Quantum Physics'

Database: restaurant
Question: How many cities are there in Monterey?
Evidence: Monterey refers to region = 'monterey'
SQL: SELECT COUNT(DISTINCT city) FROM geographic WHERE region = 'monterey'