Database: bike_share_1
Question: What is the average duration of trips for the starting station of Santa Clara at Almaden and what is the latitude and longitude of this station?
Evidence: average duration = DIVIDE(SUM(duration), COUNT(id)); starting station refers to start_station_name; start_station_name = 'Santa Clara at Almaden'; latitude refers to lat; longitude refers to long;
SQL: SELECT AVG(T1.duration), T2.lat, T2.long FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name LEFT JOIN station AS T3 ON T3.name = T1.end_station_name WHERE T1.start_station_name = 'Santa Clara at Almaden'

Database: human_resources
Question: Mention the full name, hired date and performance status of the employee whose location is in Utah state.
Evidence: full name = firstname, lastname; Utah refers to state = 'UT'
SQL: SELECT T1.firstname, T1.lastname, T1.hiredate, T1.performance FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T2.state = 'UT'

Database: retail_complains
Question: List priority 2 complaints by date received.
SQL: SELECT DISTINCT `Complaint ID` FROM callcenterlogs WHERE priority = 2 ORDER BY `Date received` DESC

Database: chicago_crime
Question: List the report number of crimes against property happened in Riverdale.
Evidence: crime against property refers to crime_against = 'Property'; Riverdale refers to community_area_name = 'Riverdale'
SQL: SELECT SUM(CASE WHEN T1.crime_against = 'Property' THEN 1 ELSE 0 END) FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T2.fbi_code_no = T1.fbi_code_no INNER JOIN Community_Area AS T3 ON T3.community_area_no = T2.community_area_no WHERE T3.community_area_name = 'Riverdale'

Database: bike_share_1
Question: Which is the station where no bike could not be borrowed form on the 2013/11/03 02:01:01? State the location of the station.
Evidence: Latitude and longitude coordinates can be used to indicate a location, where latitude refers to lat longtitude refer to long; bikes_available = 0 means no bike can be borrowed; 3/11/2013 02:01:01 refers to time;
SQL: SELECT T1.name, T1.long FROM station AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.id WHERE T2.time = '2013/11/03 02:01:01' AND T2.bikes_available = 0

Database: regional_sales
Question: Among the products with an order quantity of no less than 5 that was shipped in the month of May 2019, what is the name of the product with the lowest net profit?
Evidence: order quantity of no less than 5 refers to Order Quantity > 5; shipped in the month of May 2019 refers to ShipDate LIKE '5/%/19'; lowest net profit = Min(Subtract(Unit Price, Unit Cost)); name of product refers to Products Name
SQL: SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.`Order Quantity` > 5 AND ShipDate LIKE '5/%/19' ORDER BY REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '') ASC LIMIT 1

Database: talkingdata
Question: Which category does the app id No.894384172610331000 belong to?
SQL: SELECT T1.category FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id WHERE T2.app_id = '894384172610331000'

Database: address
Question: What is the difference in the number of bad alias between Aguada city and Aguadilla city?
Evidence: SUBTRACT(COUNT(bad_alias where city = 'Aguada'), COUNT(bad_alias where city = 'Aguadilla'));
SQL: SELECT COUNT(CASE WHEN T2.city = 'Aguada' THEN T1.bad_alias ELSE NULL END) - COUNT(CASE WHEN T2.city = 'Aguadilla' THEN T1.bad_alias ELSE NULL END) AS DIFFERENCE FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code

Database: sales
Question: Calculate the average quantity per sales from sales id 20 to 30.
Evidence: average quantity = AVG(Quantity); SalesID BETWEEN 20 AND 30;
SQL: SELECT AVG(Quantity) FROM Sales WHERE SalesID BETWEEN 20 AND 30

Database: image_and_language
Question: List attributes for object class 'tip' In image 1314.
Evidence: attributes for object refer to ATT_CLASS; class 'tip' in image 1314 refers to OBJ_CLASS = 'tip' where IMG_ID = 1314;
SQL: SELECT T1.ATT_CLASS FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T3.IMG_ID = 1314 AND T4.OBJ_CLASS = 'tip'

Database: university
Question: How many percent of universities got a score above 80 under International criteria in 2016? Among them, name the university which got the highest score.
Evidence: got a score above 80 refers to score > 80; under International criteria refers to criteria_name = 'International'; in 2016 refers to year = 2016; highest score refers to MAX(score)
SQL: SELECT CAST(SUM(CASE WHEN T2.score > 80 THEN 1 ELSE 0 END) AS REAL) / COUNT(*), ( 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 WHERE T1.criteria_name = 'International' AND T2.year = 2016 AND T2.score > 80 ORDER BY T2.score DESC LIMIT 1 ) AS max 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 WHERE T1.criteria_name = 'International' AND T2.year = 2016

Database: donor
Question: Is the donor of the project 'Calculate, Financial Security For Tomorrow Starts Today! ' a teacher?
Evidence: Calculate, Financial Security For Tomorrow Starts Today! ' is title; donor is a teacher refers to is_teacher_acct = 't'
SQL: SELECT T2.is_teacher_acct FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Calculate, Financial Security For Tomorrow Starts Today! '

Database: professional_basketball
Question: Which team that didn't play in playoffs had the most total rebounds in the year 1997?
Evidence: didn't play in playoffs refers to PostGP = 0; in the year 1997 refers to year = 1997; the most total rebounds refers to max(o_tmRebound)
SQL: SELECT T2.tmID FROM players_teams AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.PostGP = 0 AND T1.year = 1997 ORDER BY T1.rebounds DESC LIMIT 1

Database: retails
Question: Please list the names of all the suppliers for the part with the highest retail price.
Evidence: supplier name refers to s_name; the highest retail price refers to max(p_retailprice)
SQL: SELECT T3.s_phone FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey WHERE T1.p_name = 'hot spring dodger dim light' ORDER BY T1.p_size DESC LIMIT 1

Database: retail_complains
Question: In complaints about the credit card product, list the phone number of the oldest client.
Evidence: oldest refers to max(age)
SQL: SELECT T1.phone FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Product = 'Credit card' ORDER BY T1.age DESC LIMIT 1

Database: donor
Question: When was the first ever project went live on the site and what were the names of the resources being requested? If there are multiple projects that have the same date, indicate each of them and their items.
Evidence: first ever project refers to min(date_posted); names of the resources refers to item_name
SQL: SELECT T2.date_posted, T1.item_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.date_posted = ( SELECT date_posted FROM projects ORDER BY date_posted ASC LIMIT 1 )

Database: world_development_indicators
Question: Mention the series code of countries using pound sterling as their currency unit. Which country belongs to high income group among them.
SQL: SELECT DISTINCT T1.CountryCode, T1.CurrencyUnit, T1.IncomeGroup FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.CurrencyUnit = 'Pound sterling' AND T1.IncomeGroup LIKE '%high income%'