Database: retail_world
Question: Which products are being supplied by "G'day, Mate"? List all of their names.
Evidence: supplied by "G'day, Mate" refers to CompanyName = 'G''day, Mate';
SQL: SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName LIKE 'G%day, Mate'

Database: synthea
Question: How many patients with 'allergy to eggs' have been immunized with 'Td (adult) preservative free'?
Evidence: allergy to eggs' refers to allergies where DESCRIPTION = 'Allergy to eggs'; immunized with 'Td (adult) preservative free' refers to immunizations where DESCRIPTION = 'Td (adult) preservative free';
SQL: SELECT COUNT(DISTINCT T2.patient) FROM allergies AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient INNER JOIN immunizations AS T3 ON T2.patient = T3.PATIENT WHERE T1.DESCRIPTION = 'Allergy to eggs' AND T3.DESCRIPTION = 'Td (adult) preservative free'

Database: shakespeare
Question: Please list all of the paragraphs that have the character name Aedile.
Evidence: paragraphs  refers to ParagraphNum; character name Aedile refers to CharName = 'Aedile'
SQL: SELECT T2.ParagraphNum FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.CharName = 'Aedile'

Database: beer_factory
Question: Which customer has the most reviews? State the full name.
Evidence: customer that has the most reviews refers to MAX(COUNT(CustomerID)); full name = First, Last;
SQL: SELECT T1.First, T1.Last FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T1.CustomerID ORDER BY COUNT(T2.CustomerID) DESC LIMIT 1

Database: university
Question: What is the student staff ratio at the university with the greatest student staff ratio of all time?
Evidence: greatest student staff ratio of all time refers to max(student_staff_ratio)
SQL: SELECT MAX(student_staff_ratio) FROM university_year ORDER BY student_staff_ratio DESC LIMIT 1

Database: video_games
Question: How many times more is the number of games which were published by Atari than Athena?
Evidence: published by Atari refers to publisher_name = 'Atari'; published by  Athena refers to publisher_name = 'Athena'; times = divide(sum(publisher_id where publisher_name = 'Atari'), sum(publisher_id where publisher_name = 'Athena'))
SQL: SELECT CAST(COUNT(CASE WHEN T1.publisher_name = 'Atari' THEN T2.game_id ELSE NULL END) AS REAL) / COUNT(CASE WHEN T1.publisher_name = 'Athena' THEN T2.game_id ELSE NULL END) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id

Database: cars
Question: Which country produced the car with the lowest price?
Evidence: the lowest price refers to min(price)
SQL: SELECT T3.country FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country ORDER BY T1.price ASC LIMIT 1

Database: movie_3
Question: Please list the full names of all the actors that have starred in the film ACADEMY DINOSAUR.
Evidence: full name refers to first_name, last_name; "ACADEMY DINOSAUR" is the title of film
SQL: SELECT T1.first_name, T1.last_name 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.title = 'ACADEMY DINOSAUR'

Database: movie_3
Question: What are the films that are least rented by the customers?
Evidence: film refers to title; least rented refers to count(min(customer_id))
SQL: SELECT T.title FROM ( SELECT T3.title, COUNT(T1.customer_id) AS num FROM rental AS T1 INNER JOIN inventory AS T2 ON T1.inventory_id = T2.inventory_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id GROUP BY T3.title ) AS T ORDER BY T.num DESC LIMIT 1

Database: shooting
Question: Which type of weapon was used to attack the victim in the record number 031347-2015? What is the victim's race and gender?
Evidence: type of weapon refers to subject_weapon; record number 031347-2015 refers to case_number = '031347-2015'
SQL: SELECT T1.subject_weapon, T2.race, T2.gender FROM incidents AS T1 INNER JOIN subjects AS T2 ON T1.case_number = T2.case_number WHERE T1.case_number = '031347-2015'

Database: cars
Question: How many cylinders does the cheapest car have?
Evidence: the cheapest car refers to min(price)
SQL: SELECT T1.cylinders FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY price ASC LIMIT 1

Database: soccer_2016
Question: How many matches were held in 2011?
Evidence: held in 2011 refers to Match_Date like '2011%';
SQL: SELECT COUNT(Match_Id) FROM `Match` WHERE Match_Date LIKE '2011%'

Database: retail_world
Question: Give the name of the territory where Mr. Robert King works.
Evidence: name of territory refers to TerritoryDescription; Mr. refers to TitleOfCourtesy = 'Mr';
SQL: SELECT T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.TitleOfCourtesy = 'Mr.' AND T1.FirstName = 'Robert' AND T1.LastName = 'King'

Database: law_episode
Question: Which episodes of the Law & Order have been nominated for the Primetime Emmy Awards?
Evidence: episode refers to award; the Primetime Emmy Awards refers to award_category like 'Primetime Emmy'
SQL: SELECT DISTINCT episode_id FROM Award WHERE award_category = 'Primetime Emmy'

Database: language_corpus
Question: Among the biwords pairs with "àbac" as its first word, how many of them have an occurrence of over 10?
Evidence: àbac refers to word = 'àbac'; as first word refers to w1st; occurrence of over 10 refers to occurrences > 10
SQL: SELECT COUNT(T2.w2nd) FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st WHERE T1.word = 'àbac' AND T2.occurrences > 10

Database: talkingdata
Question: Please list the location coordinates of all the devices with an inactive app user when event no.2 happened.
Evidence: location coordinates = longitude, latitude; inactive refers to is_active = 0; event no. refers to event_id; event_id = 2;
SQL: SELECT DISTINCT T2.longitude, T2.latitude FROM app_events AS T1 INNER JOIN events AS T2 ON T2.event_id = T1.event_id WHERE T2.event_id = 2 AND T1.is_active = 0

Database: movie_3
Question: How many customers are active?
Evidence: active refers to active = 1
SQL: SELECT COUNT(customer_id) FROM customer WHERE active = 1

Database: soccer_2016
Question: Which team won by wickets in match ID 335993?
Evidence: team refers to Team_Name
SQL: SELECT T1.Team_Name FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.match_winner INNER JOIN Player_Match AS T3 ON T1.Team_Id = T3.Team_Id INNER JOIN Win_By AS T4 ON T2.Win_Type = T4.Win_Id WHERE T2.Match_Id = '335993' GROUP BY T1.Team_Name

Database: chicago_crime
Question: What is the average population of the wards where apartment crimes have been reported without arrests?
Evidence: apartment crime refers to location_description = 'APARTMENT';  without arrest refers to arrest = 'FALSE'; average population = AVG(Population)
SQL: SELECT AVG(T2.Population) FROM Crime AS T1 INNER JOIN Ward AS T2 ON T2.ward_no = T1.ward_no WHERE T1.location_description = 'APARTMENT' AND T1.arrest = 'FALSE'

Database: airline
Question: How many flights on 2018/8/1 were operated by American Airlines Inc.?
Evidence: on 2018/8/1 refers to FL_DATE = '2018/8/1'; American Airlines Inc. refers to Description = 'American Airlines Inc.: AA';
SQL: SELECT COUNT(*) FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN INNER JOIN `Air Carriers` AS T3 ON T2.OP_CARRIER_AIRLINE_ID = T3.Code WHERE T2.FL_DATE = '2018/8/1' AND T3.Description = 'American Airlines Inc.: AA'