Database: movie_3
Question: What is the difference in the average number of films rented each day in Australia and Canada?
Evidence: 'Australia' AND 'Canada' are country; average number of films refers to AVG('Australia') AND AVG('Canada'); calculation = SUBTRACT(AVG('Australia'), AVG('Canada'))
SQL: SELECT AVG(IIF(T4.country = 'Australia', 1, 0)) - AVG(IIF(T4.country = 'Canada', 1, 0)) AS diff FROM customer AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id INNER JOIN city AS T3 ON T2.city_id = T3.city_id INNER JOIN country AS T4 ON T3.country_id = T4.country_id

Database: shakespeare
Question: List the paragraph number and paragraphs said by the character named "Sir Andrew Aguecheek".
Evidence: paragraph number refers to ParagraphNum; character named "Sir Andrew Aguecheek" refers to CharName = 'Sir Andrew Aguecheek'
SQL: SELECT T2.ParagraphNum, T2.id FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.CharName = 'Sir Andrew Aguecheek'

Database: donor
Question: To which city did donor “22cbc920c9b5fa08dfb331422f5926b5” donate?
Evidence: donor “22cbc920c9b5fa08dfb331422f5926b5” refers to donor_acctid = '22cbc920c9b5fa08dfb331422f5926b5'; city refers to donor_city
SQL: SELECT DISTINCT donor_city FROM donations WHERE donor_acctid = '22cbc920c9b5fa08dfb331422f5926b5'

Database: video_games
Question: Provide the game publisher's name of the game with sales greater than 90% of the average sales in Japan.
Evidence: game publisher's name refers to publisher_name; sales greater than 90% of the average sales refers to num_sales > multiply(0.9, avg(num_sales)); in Japan refers to region_name = 'Japan'
SQL: SELECT DISTINCT T5.publisher_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id INNER JOIN game_publisher AS T4 ON T3.game_publisher_id = T4.id INNER JOIN publisher AS T5 ON T4.publisher_id = T5.id WHERE T2.num_sales * 10000000 > ( SELECT AVG(T2.num_sales) * 100000 * 90 FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id WHERE T1.region_name = 'Japan' )

Database: soccer_2016
Question: Give the name of the team of T Kohli in the match ID 335989.
Evidence: team of T Kohli refers to player_name = 'T Kohli';
SQL: SELECT T1.Team_Name FROM Team AS T1 INNER JOIN Player_Match AS T2 ON T1.Team_Id = T2.Team_Id INNER JOIN Player AS T3 ON T2.Player_Id = T3.Player_Id WHERE T2.match_id = 335989 AND T3.player_name = 'T Kohli'

Database: movie_platform
Question: For movie id 1269, how many users, who was a paying subscriber and was eligible for trial when he rated the movie, gave the movie a rating score of less than or equal to 2?
Evidence: paying subscriber refers to user_has_payment_method = 1; eligible for trial refers to user_eligible_for_trial = 1; rating_score< = 2;
SQL: SELECT COUNT(*) FROM ratings WHERE movie_id = 1269 AND rating_score <= 2 AND user_eligible_for_trial = 1 AND user_has_payment_method = 1

Database: donor
Question: How much donations have been collected for project 'Whistle While We Work!'?
Evidence: donations collected refers to sum(donation_to_project); project 'Whistle While We Work!' refers to title = 'Whistle While We Work!'
SQL: SELECT SUM(T2.donation_to_project) FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title = 'Whistle While We Work!'

Database: movie
Question: Among the actors starred in Die Hard 2, list their net worth and birth date of actors with a height between 60 to 65.
Evidence: Die Hard 2 refers to Title = 'Die Hard 2'; height between 60 to 65 refers to Height (Inches) BETWEEN 60 AND 65
SQL: SELECT T3.NetWorth, T3.`Date of Birth` FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.Title = 'Die Hard 2' AND T3.`Height (Inches)` BETWEEN 60 AND 65

Database: retail_complains
Question: In the complains received in 2012, how many of them are submitted through email?
Evidence: received in 2012 refers to Date received LIKE '2012%'; submitted through email refers to Submitted via = 'Email'
SQL: SELECT COUNT(`Submitted via`) FROM events WHERE strftime('%Y', `Date received`) = '2012' AND `Submitted via` = 'Email'

Database: simpson_episodes
Question: List all of the award winners' birth dates.
Evidence: award winner refers to result = 'Winner'
SQL: SELECT T1.birthdate FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.result = 'Winner';

Database: restaurant
Question: Please list all of the restaurants that serve European food.
Evidence: restaurant refers to label; European food refers to food_type = 'european'
SQL: SELECT label FROM generalinfo WHERE food_type = 'european'

Database: retails
Question: What is the average discount for the parts made by Manufacturer#5?
Evidence: DIVIDE(SUM(l_discount), COUNT(l_partkey)) where p_mfgr = 'Manufacturer#5';
SQL: SELECT AVG(T3.l_discount) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN lineitem AS T3 ON T2.ps_suppkey = T3.l_suppkey WHERE T1.p_mfgr = 'Manufacturer#5'

Database: retail_world
Question: What is the name of the supplier company for Aniseed Syrup?
Evidence: name of the supplier refers to CompanyName; Aniseed Syrup refers to ProductName = 'Aniseed Syrup';
SQL: SELECT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Aniseed Syrup'

Database: social_media
Question: Count the total number of tweet IDs in `en`.
Evidence: "en" is the language and refers to Lang = 'en'
SQL: SELECT COUNT(DISTINCT TweetID) FROM twitter WHERE Lang = 'en'

Database: book_publishing_company
Question: What is the title that have at least 10% royalty without minimum range amount.
Evidence: at least 10% royalty refers to royalty > = 10; minimum range is synonym for low range which refers to lorange; without minimum range amount refers to lorange <> 0
SQL: SELECT T1.title FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id WHERE T2.lorange = 0 AND T2.royalty >= 10

Database: computer_student
Question: List down the advised student IDs and IDs of employing professor in faculty.
Evidence: advised student IDs refers to person.p_id; IDs of employing professor in faculty refers to p_id_dummy and hasPosition = 'Faculty_eme'
SQL: SELECT T1.p_id, T2.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id_dummy = T2.p_id WHERE hasPosition = 'Faculty_eme'

Database: authors
Question: What is the percentage of preprints of John Van Reenen's papers?
Evidence: year = 0 means this paper is preprint; John Van Reenen is the author's name; papers refers to paper.Id; calculation = DIVIDE(SUM(paper.Id where Name = 'John Van Reenen' AND ConferenceID = 0 AND  JournalId = 0), SUM(paper.Id where Name = 'John Van Reenen'))
SQL: SELECT CAST(SUM(CASE WHEN T1.ConferenceId = 0 AND T1.JournalId = 0 THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.Id) FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'John Van Reenen'

Database: beer_factory
Question: What is the average unit profit for wholesalers of canned beers?
Evidence: average unit profit = DIVIDE(SUM(SUBTRACT(CurrentRetailPrice, WholesaleCost)), COUNT(ContainerType = 'Can')); canned beers refers to ContainerType = 'Can';
SQL: SELECT AVG(T2.CurrentRetailPrice - T2.WholesaleCost) FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID WHERE T1.ContainerType = 'Can'

Database: public_review_platform
Question: List down the business ID with a star range from 3 to 5, located at Chandler.
Evidence: businesses with a star range from 3 to 5 refers to stars BETWEEN 3 AND 5; Chandler is a city
SQL: SELECT business_id FROM Business WHERE stars >= 3 AND stars < 6 AND city = 'Chandler'