Database: retails
Question: How many customers in the building segments have orders with a total price of no less than 50,000?
Evidence: building segment refers to c_mktsegment = 'BUILDING'; a total price of no less than 50,000 refers to o_totalprice > 50000
SQL: SELECT COUNT(T2.c_name) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'BUILDING' AND T1.o_totalprice > 50000

Database: mental_health_survey
Question: Provide the number of users who took part in the "mental health survey for 2016".
Evidence: mental health survey for 2016 refers to SurveyID = 2016
SQL: SELECT COUNT(DISTINCT T1.UserID) FROM Answer AS T1 INNER JOIN Survey AS T2 ON T1.SurveyID = T2.SurveyID WHERE T2.Description = 'mental health survey for 2016'

Database: food_inspection
Question: What are the names of the establishments that met all of the required standards in 2013?
Evidence: establishments have the same meaning as businesses; met all of the required standards refers to score = 100; year(date) = 2013
SQL: SELECT DISTINCT T2.name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2013' AND T1.score = 100

Database: regional_sales
Question: Please list the id and detailed position of all stores in Birmingham city.
Evidence: Latitude and Longitude coordinates can be used to identify the detailed position of stores; id refers to StoreID;
SQL: SELECT StoreID, Latitude, Longitude FROM `Store Locations` WHERE `City Name` = 'Birmingham'

Database: donor
Question: What are the favorite project types of each of the top 10 donors?
Evidence: favorite project type refers to project_resource_type; top donors refers to max(donation_total)
SQL: SELECT project_resource_type FROM ( SELECT T1.donor_acctid, T3.project_resource_type FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN resources AS T3 ON T2.projectid = T3.projectid ORDER BY T1.donation_total DESC LIMIT 10 ) GROUP BY project_resource_type ORDER BY COUNT(project_resource_type) DESC LIMIT 1

Database: movielens
Question: What are the ID of actors that had worked together with director 22397? What was the genre of that movie?
SQL: SELECT T2.actorid, T4.genre FROM movies AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid INNER JOIN actors AS T3 ON T2.actorid = T3.actorid INNER JOIN movies2directors AS T4 ON T1.movieid = T4.movieid WHERE T4.directorid = 22397

Database: olympics
Question: How many different football events are there?
Evidence: events refer to event_name; football refers to sport_name = 'Football';
SQL: SELECT COUNT(T2.event_name) FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id WHERE T1.sport_name = 'Football'

Database: movie_3
Question: List the films' titles which were rented by Brian Wyman in July, 2005.
Evidence: rented in July 2005 refers to year (rental_date) = 2005 and month (rental_date) = 7
SQL: SELECT T4.title FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T1.first_name = 'BRIAN' AND T1.last_name = 'WYMAN' AND STRFTIME('%Y', T2.rental_date) = '2005' AND STRFTIME('%m',T2.rental_date) = '7'

Database: image_and_language
Question: How many objects are there in the attribute class id with the highest number of objects?
Evidence: objects refers to OBJ_SAMPLE_ID; attribute class id with the highest number of objects refers to max(COUNT(ATT_CLASS_ID))
SQL: SELECT COUNT(ATT_CLASS_ID) FROM IMG_OBJ_att GROUP BY IMG_ID ORDER BY COUNT(ATT_CLASS_ID) DESC LIMIT 1

Database: menu
Question: How many dishes are there on page 1 of menu ID12882?
Evidence: page 1 refers to page_number = 1;
SQL: SELECT SUM(CASE WHEN T1.page_number = 1 THEN 1 ELSE 0 END) FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id WHERE T1.menu_id = 12882

Database: language_corpus
Question: Indicate if there is any pair formed by the words fukunaga and d'egees.
Evidence: Pair is a relationship of two words: w1st and w2nd, where w1st is word id of the first word and w2nd is a word id of the second word;  w1st = word = 'fukunaga' or w2nd = word = 'fukunaga'; w1st = word = 'd'egees'or w2nd = word = 'd'egees';
SQL: SELECT CASE WHEN COUNT(T1.wid) > 0 THEN 'yes' ELSE 'no' END FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st OR T1.wid = T2.w2nd WHERE T2.w1st = ( SELECT wid FROM words WHERE T1.word = 'fukunaga' ) AND T2.w2nd = ( SELECT wid FROM words WHERE word LIKE 'd%egees' )

Database: restaurant
Question: What cities are located in Northern California?
Evidence: Northern California refers to region = 'northern california'
SQL: SELECT city FROM geographic WHERE region = 'northern california'

Database: book_publishing_company
Question: What's Pedro S Afonso's job title?
Evidence: job title means job description which refers to job_desc
SQL: SELECT T2.job_desc FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.fname = 'Pedro' AND T1.minit = 'S' AND T1.lname = 'Afonso'

Database: talkingdata
Question: What percentage of women do not have applications installed on their mobile with respect to men?
Evidence: percentage = MULTIPLY(DIVIDE(SUM(gender = 'F'), SUM(gender = 'M')), 1.0); women refers to gender = 'F'; not installed refers to is_installed = 0; men refers to gender = 'M';
SQL: SELECT SUM(IIF(T1.gender = 'F', 1, 0)) / SUM(IIF(T1.gender = 'M', 1, 0)) AS per FROM gender_age AS T1 INNER JOIN events_relevant AS T2 ON T1.device_id = T2.device_id INNER JOIN app_events_relevant AS T3 ON T2.event_id = T3.event_id WHERE T3.is_installed = 0

Database: legislator
Question: How many official social media does Mark Warner have?
Evidence: official social media refers to facebook is not null, instagram is not null, twitter is not null, youtube is not null; Mark Warner is an official_full_name; official_full_name refers to first_name, last_name
SQL: SELECT CASE WHEN T1.facebook IS NOT NULL THEN 1 END + CASE WHEN T1.instagram IS NOT NULL THEN 1 END + CASE WHEN T1.twitter IS NOT NULL THEN 1 END + CASE WHEN T1.youtube IS NOT NULL THEN 1 END AS COUNTSOCIAL FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T2.first_name = 'Mark' AND T2.last_name = 'Warner'

Database: retail_world
Question: Write down the full name of Vie President of Sales and his age when he was hired.
Evidence: Vice President of Sales refers to Title = 'Vice President, Sales';
SQL: SELECT FirstName, LastName , TIMESTAMPDIFF(YEAR, BirthDate, HireDate) AS AGE FROM Employees WHERE Title = 'Vice President, Sales'

Database: college_completion
Question: What is the percentage of the number of 4-year public schools from Madison Area Technical College's home state in the Alabama?
Evidence: percentage = MULTIPLY(DIVIDE(SUM(chronname = 'Madison Area Technical College'), SUM(state = 'Alabama')), 100); 4-year refers to level = '4-year'; public refers to control = 'Public'; Madison Area Technical College refers to chronname = 'Madison Area Technical College'; home state in the United States refers to state;
SQL: SELECT CAST(COUNT(DISTINCT CASE WHEN T1.state = ( SELECT T1.state FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON T2.state = T1.state WHERE T1.chronname = 'Madison Area Technical College' ) AND T1.level = '4-year' AND T1.control = 'Public' THEN T1.chronname ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT CASE WHEN T2.state = 'Alabama' THEN T1.chronname ELSE NULL END) FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON T2.state = T1.state

Database: movie_3
Question: List the names of the films that are more than 180 minutes long.
Evidence: more than 180 min long refers to length > 180; name of film refers to title
SQL: SELECT title FROM film WHERE length > 180