Database: food_inspection_2
Question: What is the average number of inspections done by the top 5 employees with the highest salary? List the names of the said employees.
Evidence: the highest salary refers to max(salary); sanitarian refers to title = 'Sanitarian'; name refers to first_name, last_name; average number = divide(sum(inspection_id), 5)
SQL: SELECT CAST(COUNT(DISTINCT T2.inspection_id) AS REAL) / 5, T1.first_name, T1.last_name FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T1.title = 'Sanitarian' ORDER BY T1.salary DESC LIMIT 5

Database: public_review_platform
Question: How many businesses accept insurance?
Evidence: business that accept insurance refers to attribute_name = 'Accepts Insurance' AND attribute_value = 'true'
SQL: SELECT COUNT(T1.business_id) FROM Business_Attributes AS T1 INNER JOIN Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T2.attribute_name = 'Accepts Insurance' AND T1.attribute_value = 'true'

Database: movies_4
Question: How many movies did Universal Studios release?
Evidence: Universal Studios refers to company_name = 'Universal Studios'
SQL: SELECT COUNT(T2.movie_id) FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id WHERE T1.company_name = 'Universal Studios'

Database: social_media
Question: Please list all the cities in Argentina.
Evidence: "Argentina" is the Country
SQL: SELECT City FROM location WHERE City IS NOT NULL AND Country = 'Argentina'

Database: superstore
Question: In west superstore, what is the name and the shipping mode of the product that was ordered with the shortest shipment time?
Evidence: name refers to "Product Name"; shipping mode refers to Ship Mode; shortest shipment time refers to min(subtract(Ship Date, Order Date))
SQL: SELECT DISTINCT T2.`Product Name`, T1.`Ship Mode` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Region = 'West' ORDER BY T1.`Ship Date` - T1.`Order Date` LIMIT 1

Database: regional_sales
Question: What sales channels are used the most in the 3 places with the highest median income?
Evidence: highest median income refers to Max(Median Income)
SQL: SELECT `Sales Channel` FROM ( SELECT T1.`Sales Channel` FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID ORDER BY T2.`Median Income` DESC LIMIT 3 ) GROUP BY `Sales Channel` ORDER BY COUNT(`Sales Channel`) DESC LIMIT 1

Database: books
Question: In books published by Ace Book, what is the percentage of English books published?
Evidence: "Ace Book" is the publisher_name; English book refers to language_name = 'English'; percentage = Divide (Count(book_id where language_name = 'English'), Count(book_id)) * 100
SQL: SELECT CAST(SUM(CASE WHEN T1.language_name = 'English' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM book_language AS T1 INNER JOIN book AS T2 ON T1.language_id = T2.language_id INNER JOIN publisher AS T3 ON T3.publisher_id = T2.publisher_id WHERE T3.publisher_name = 'Ace Book'

Database: world_development_indicators
Question: Please list the notes for Aruba on the indicators under the topic of Environment: Energy production & use.
Evidence: note refers to Description; for Aruba refers to ShortName = 'Aruba'
SQL: SELECT T2.Description FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode INNER JOIN Series AS T3 ON T2.Seriescode = T3.SeriesCode WHERE T1.ShortName = 'Aruba' AND T3.Topic = 'Environment: Energy production & use'

Database: authors
Question: Indicate the name of all the journals published in the paper database in the year 2001.
Evidence: name of all the journals refers to FullName
SQL: SELECT T2.FullName FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Year = 2001 AND T1.ConferenceId > 0 AND T1.JournalId > 0

Database: movie_3
Question: Who is the customer with the largest payment for rental films?
Evidence: Who refers to first_name, last_name; the largest payment for rental refers to MAX(SUM(amount))
SQL: SELECT T.first_name, T.last_name FROM ( SELECT T1.first_name, T1.last_name, SUM(T2.amount) AS num FROM customer AS T1 INNER JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.first_name, T1.last_name ) AS T ORDER BY T.num DESC LIMIT 1

Database: retail_complains
Question: Calculate the average age of clients from the Midwest region.
Evidence: average age = AVG(age);
SQL: SELECT CAST(SUM(T1.age) AS REAL) / COUNT(T3.Region) AS average FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T3.Region = 'Midwest'

Database: european_football_1
Question: What percentage of matches played on 2005/07/30 belong to the F1 division?
Evidence: Division refers to Div; DIVIDE(COUNT(Div = 'F1', Date = '2005/07/30'), COUNT(Div, Date = '2005/07/30')) as percentage;
SQL: SELECT CAST(SUM(CASE WHEN Div = 'F1' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(Div) FROM matchs WHERE Date = '2005-07-30'

Database: software_company
Question: Please list the occupations of the customers over 40 and have sent a true response to the incentive mailing sent by the marketing department.
Evidence: over 40 refers to age > 40; RESPONSE = 'true';
SQL: SELECT DISTINCT T1.OCCUPATION FROM Customers AS T1 INNER JOIN Mailings1_2 AS T2 ON T1.ID = T2.REFID WHERE T1.age > 40 AND T2.RESPONSE = 'true'

Database: shipping
Question: What is the percentage of wholesaler customers who have shipment weight of not greater than 70000 pounds?
Evidence: "wholesaler" is the cust_type; weight of not greater than 70000 pounds refers to weight < 70000; percentage = Divide (Count(cust_id where weight < 70000), Count(cust_id)) * 100
SQL: SELECT CAST(SUM(CASE WHEN T2.weight < 70000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.cust_type = 'wholesaler'

Database: sales_in_weather
Question: How many units of item no.5 were sold in store no.3 on average on the days when the max temperature exceeded 90?
Evidence: item no. 5 refers to item_nbr = 5; store no.3 refers to store_nbr = 3;  when the maximum temperature exceed 90 refers to tmax > 90; average = Divide (Sum(units), Count(date))
SQL: SELECT CAST(SUM(T1.units) AS REAL) / COUNT(T1.`date`) FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T1.store_nbr = 3 AND T1.item_nbr = 5 AND T3.tmax > 90

Database: image_and_language
Question: Write the object classes of image ID 22 alongside the object's width and height.
Evidence: object classes of image ID 22 refers to OBJ_CLASS where IMG_ID = 22; the object's width and heigh refer to W and H coordinates of the bounding box respectively;
SQL: SELECT T1.W, T1.H, T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 22

Database: sales
Question: List down all of the sales IDs for sales handled by sales people with first name starting with alphabet "s".
Evidence: first name starting with alphabet "s" refers to FirstName LIKE 's%';
SQL: SELECT T1.SalesID FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID WHERE SUBSTR(T2.FirstName, 1, 1) = 's'

Database: movielens
Question: Which adventure movie has the highest average rating?
SQL: SELECT T1.movieid FROM movies2directors AS T1 INNER JOIN u2base AS T2 ON T1.movieid = T2.movieid WHERE T1.genre = 'Adventure' GROUP BY T1.movieid ORDER BY AVG(T2.rating) DESC LIMIT 1