Database: public_review_platform
Question: What is the yearly average review done by user ID 3?
Evidence: yearly average review = Divide( Count(business_id), Subtract('%Y'(CURRENT_TIME), user_yelping_since_year))
SQL: SELECT COUNT(review_stars) / (strftime('%Y', 'now') - T1.user_yelping_since_year) FROM Users AS T1 INNER JOIN Reviews AS T2 ON T1.user_id = T2.user_id WHERE T1.user_id = 3

Database: movie_3
Question: What is the full name of the actor who has the highest number of restricted films?
Evidence: restricted refers to rating = 'R'; highest number of film refers to Max(Count(film_id)); full name refers to first_name, last_name
SQL: SELECT T.first_name, T.last_name FROM ( SELECT T1.first_name, T1.last_name, COUNT(T2.film_id) AS num 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 WHERE T3.rating = 'R' GROUP BY T1.first_name, T1.last_name ) AS T ORDER BY T.num DESC LIMIT 1

Database: ice_hockey_draft
Question: How many teams did the heaviest player drafted by Arizona Coyotes have played for?
Evidence: heaviest player refers to MAX(weight_in_lb); drafted by Arizona Coyotes refers to overallby = 'Arizona Coyotes';
SQL: SELECT COUNT(T2.TEAM) FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID INNER JOIN weight_info AS T3 ON T1.weight = T3.weight_id WHERE T1.overallby = 'Arizona Coyotes' ORDER BY T3.weight_in_lbs DESC LIMIT 1

Database: university
Question: Please list the names of all the universities that scored under 60 in teaching in 2011 and are in the United States of America.
Evidence: scored under 60 refers to score < 60; in 2011 refers to year 2011; in teaching refers to criteria_name = 'Teaching'; in the United States of America refers to country_name = 'United States of America';
SQL: SELECT T3.university_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id INNER JOIN country AS T4 ON T4.id = T3.country_id WHERE T4.country_name = 'United States of America' AND T2.year = 2011 AND T2.score < 60 AND T1.criteria_name = 'Teaching'

Database: soccer_2016
Question: List the names of all the umpires from England.
Evidence: from England refers to Country_Name = 'England'
SQL: SELECT T1.Umpire_Name FROM Umpire AS T1 INNER JOIN country AS T2 ON T2.Country_Id = T1.Umpire_Country WHERE T2.Country_Name = 'England'

Database: music_platform_2
Question: What is the content of the review under the title "really interesting!" and is created on 2018-04-24 at 12:05:16?
Evidence: "really interesting" is the title of review;  created on 2018-04-24 at 12:05:16 refers to created_at = '2018-04-24T12:05:16-07:00'
SQL: SELECT content FROM reviews WHERE title = 'really interesting!' AND created_at = '2018-04-24T12:05:16-07:00'

Database: retail_complains
Question: Please give the first name and phone number of the client whose complaint id is CR0922485.
Evidence: first name refers to first
SQL: SELECT T1.first, T1.phone FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Complaint ID` = 'CR0922485'

Database: european_football_1
Question: What was the difference in home team and away team win percentages across all divisions in 2010?
Evidence: 2010 refers to season = 2010; SUBTRACT(DIVIDE(COUNT(Div where FTR = 'H', season = 2010), COUNT(Div where season = 2010)), COUNT(Div where FTR = 'A', season = 2010), COUNT(Div where season = 2010)) as percentage;
SQL: SELECT CAST(COUNT(CASE WHEN FTR = 'H' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(FTR) - CAST(COUNT(CASE WHEN FTR = 'A' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(FTR) DIFFERENCE FROM matchs WHERE season = 2010

Database: simpson_episodes
Question: In "No Loan Again, Naturally", how many stars received votes of no more than 50?
Evidence: "No Loan Again, Naturally" is the title of episode; votes of no more than 50 refers to votes < 50; number of stars refers to SUM(stars)
SQL: SELECT COUNT(*) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.title = 'No Loan Again, Naturally' AND T2.votes < 50;

Database: movie_3
Question: Please list the full names of any three inactive customers.
Evidence: full name refers to first_name, last_name; inactive customers refers to active = 0
SQL: SELECT first_name, last_name FROM customer WHERE active = 0 LIMIT 3

Database: shakespeare
Question: What is the average number of characters in all the works of Shakespeare?
Evidence: average number = divide(sum(character_id), count(work_id))
SQL: SELECT SUM(DISTINCT T4.id) / COUNT(T1.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id

Database: app_store
Question: How many neutral reviews does the app "Dino War: Rise of Beasts" have?
Evidence: neutral reviews refers to Sentiment = 'Neutral';
SQL: SELECT COUNT(App) FROM user_reviews WHERE App = 'Dino War: Rise of Beasts' AND Sentiment = 'Neutral'

Database: shakespeare
Question: What is the percentage of historical works that have not fewer than five scenes in the 1500s?
Evidence: historical works refers to GenreType = 'history'; have not fewer than five scenes in the 1500s refers to count(Scene) > = 5 and DATE > = 1500 AND DATE < = 1599; percentage = divide(count(works.id) where GenreType = 'history' and count(Scene) > = 5, count(works.id) ) as percentage
SQL: SELECT CAST(( SELECT COUNT(T1.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.GenreType = 'History' AND T1.DATE BETWEEN 1500 AND 1599 GROUP BY T1.id HAVING COUNT(T2.Scene) >= 5 ) AS REAL) * 100 / COUNT(id) FROM works WHERE GenreType = 'History' AND DATE BETWEEN 1500 AND 1599

Database: restaurant
Question: List down the restaurant ID of restaurants located in Sunnyvale.
Evidence: Sunnyvale refers to city = 'sunnyvale'
SQL: SELECT id_restaurant FROM location WHERE city = 'sunnyvale'

Database: retail_world
Question: State the name of employee that manages the order from Victuailles en stock?
Evidence: name of employee refers to FirstName; from Victuailles en stock refers to CompanyName = 'Victuailles en stock'
SQL: SELECT DISTINCT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID WHERE T3.CompanyName = 'Victuailles en stock'

Database: world
Question: In countries with constitutional monarchy, what is the percentage of cities located in the district of England?
Evidence: constitutional monarchy refers to GovernmentForm = 'Constitutional Monarchy'; percentage = MULTIPLY(DIVIDE(SUM(GovernmentForm = 'Constitutional Monarchy' WHERE District = 'England'), COUNT(GovernmentForm = 'Constitutional Monarchy')), 100)
SQL: SELECT CAST(SUM(CASE WHEN T1.District = 'England' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.GovernmentForm = 'Constitutional Monarchy'

Database: ice_hockey_draft
Question: What is the name of the tallest player?
Evidence: tallest player refers to MAX(height_in_cm);
SQL: SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id ORDER BY T2.height_in_cm DESC LIMIT 1

Database: music_platform_2
Question: What is the category for the "Moist Boys" podcast?
Evidence: "Moist Boys" refers to title of podcast
SQL: SELECT category FROM categories WHERE podcast_id IN ( SELECT podcast_id FROM podcasts WHERE title = 'Moist Boys' )