Database: human_resources
Question: In which state can you find the highest amount of good performing Account Representatives?
Evidence: good performing refers to performance = 'Good'; Account Representatives is a positiontitle; highest amount of employee refers to MAX(positionID);
SQL: SELECT T2.state FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID INNER JOIN position AS T3  ON T3.positionID = T1.positionID WHERE T3.positiontitle = 'Account Representative' AND T1.performance = 'Good' GROUP BY T2.state ORDER BY COUNT(T2.state) DESC LIMIT 1

Database: simpson_episodes
Question: Name the person, award, organization, result and credited status of the assistant director in S20-E13.
Evidence: "assistant director" is the role of person; 'S20-E13' is the episode_id; credited status refers to credited; credited = 'true' means the person is included in the credit list and vice versa
SQL: SELECT T1.person, T1.award, T1.organization, T1.result, T2.credited FROM Award AS T1 INNER JOIN Credit AS T2 ON T2.episode_id = T1.episode_id WHERE T2.episode_id = 'S20-E13' AND T2.role = 'assistant director';

Database: olympics
Question: Provide the names of competitors who received a gold medal.
Evidence: names of competitors refer to full_name; gold medal refers to medal_name = 'Gold';
SQL: SELECT DISTINCT T1.full_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN competitor_event AS T3 ON T2.id = T3.competitor_id INNER JOIN medal AS T4 ON T3.medal_id = T4.id WHERE T4.medal_name = 'Gold'

Database: music_platform_2
Question: Provide the names of podcasts in the art category in 2018.
Evidence: art category refers to category = 'arts'; in 2018 refers to created_at like '2018%'; name of podcast refers to title
SQL: SELECT DISTINCT T2.title FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'arts' AND T2.created_at LIKE '2018-%'

Database: superstore
Question: Compare the numbers of orders between the Eastern and Western stores in 2015.
Evidence: in 2015 refers to strftime('%Y', "Order Date") = '2015'; Eastern store refers to east_superstore; Western store refers west_superstore;
SQL: SELECT east, west FROM ( SELECT COUNT(`Order ID`) AS east , ( SELECT COUNT(`Order ID`) FROM west_superstore WHERE `Order Date` LIKE '2015%' ) AS west FROM east_superstore WHERE `Order Date` LIKE '2015%' )

Database: authors
Question: Calculate the average of authors for each paper from the year of 1990 to 2000.
Evidence: Average refer to DIVIDE(COUNT(AuthorID where Year = 1990 BETWEEN 2000), COUNT(Title where Year = 1990 BETWEEN 2000))
SQL: SELECT CAST(COUNT(DISTINCT T2.AuthorId) AS REAL) / COUNT(DISTINCT T1.Title) FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Year BETWEEN 1990 AND 2000

Database: sales_in_weather
Question: Between 1/1/2012 to 12/31/2014, which date recorded the hottest temperature in weather station 1?
Evidence: weather station 1 refers to station_nbr = 1; hottest temperature refers to Max(tmax); between 1/1/2012 to 12/31/2014 refers to SUBSTR(date, 1, 4) between 2012 and 2014
SQL: SELECT `date` FROM weather WHERE station_nbr = 1 AND CAST(SUBSTR(`date`, 1, 4) AS int) BETWEEN 2012 AND 2014 ORDER BY tmax DESC LIMIT 1

Database: movie_3
Question: What is the name and email of the staff in store ID 2?
Evidence: name refers to first_name, last_name
SQL: SELECT first_name, last_name, email FROM staff WHERE store_id = 2

Database: disney
Question: Who is the villain of the movie "Beauty and the Beast"?
Evidence: Beauty and the Beast refers to movie_title = 'Beauty and the Beast';
SQL: SELECT villian FROM characters WHERE movie_title = 'Beauty and the Beast'

Database: talkingdata
Question: What are the top 3 categories with the most app users?
Evidence: most app users refers to MAX(COUNT(app_id));
SQL: SELECT T.category FROM ( SELECT T2.category, COUNT(T1.app_id) AS num FROM app_labels AS T1 INNER JOIN label_categories AS T2 ON T1.label_id = T2.label_id GROUP BY T2.category ) AS T ORDER BY T.num DESC LIMIT 3

Database: public_review_platform
Question: List active business ids with opening times of 7AM and closing times of 8PM.
Evidence: opening times of 7AM and closing times of 8PM refer to Business_Hours where opening_time = '7AM' and closing_time = '8PM'; active business refers to business_id where active = 'true';
SQL: SELECT DISTINCT T4.business_id FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business_Hours AS T3 ON T2.business_id = T3.business_id INNER JOIN Business AS T4 ON T3.business_id = T4.business_id WHERE T4.active = 'true' AND T3.opening_time = '7AM' AND T3.closing_time = '8PM'

Database: simpson_episodes
Question: What is the average number of stars received by the episode titled 'Wedding for Disaster.'
Evidence: "Wedding for Disaster" is the title of episode; average number of stars = Divide(Sum(stars), Count(stars))
SQL: SELECT AVG(T2.stars) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.title = 'Wedding for Disaster';

Database: world
Question: Provide the country, population, capital city, and official language of the country with the smallest surface area.
Evidence: capital city refers to Capital; official language refers to IsOfficial = 'T'; smallest surface area refers to MIN(SurfaceArea);
SQL: SELECT T1.Name, T1.Population, T1.Capital, T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode INNER JOIN City AS T3 ON T1.Code = T3.CountryCode WHERE T2.IsOfficial = 'T' ORDER BY T1.SurfaceArea LIMIT 1

Database: cs_semester
Question: Please list the names of the courses taken by Laughton Antonio.
SQL: SELECT T3.name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.f_name = 'Laughton' AND T1.l_name = 'Antonio'

Database: airline
Question: What is the tail number of the flight with air carrier named Iscargo Hf: ICQ and arrival time of 1000 and below?
Evidence: tail number refers to TAIL_NUM; Iscargo Hf: ICQ refers to Description = 'Iscargo Hf: ICQ'; arrival time of 1000 and below refers to ARR_TIME < = 1000;
SQL: SELECT T2.TAIL_NUM FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.ARR_TIME <= 1000 AND T1.Description = 'Iscargo Hf: ICQ'

Database: donor
Question: What percentage of donations are given via a giving or campaign page? List the primary area of those donations.
Evidence: given via a giving or campaign page refers to via_giving_page = 't'; percentage refers to DIVIDE(count(case when via_giving_page = 't' then donationid else null end),count(donationid))*100; primary area of donation refers to primary_focus_area
SQL: SELECT CAST(SUM(CASE WHEN T1.via_giving_page = 't' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(donation_total), ( SELECT T2.primary_focus_area FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.via_giving_page = 't' GROUP BY T2.primary_focus_area ORDER BY SUM(T1.donation_total) DESC LIMIT 1 ) result FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid

Database: craftbeer
Question: Which distinct state makes beer that has the least amount of bitterness?
SQL: SELECT DISTINCT T2.state, T1.ibu FROM beers AS T1 INNER JOIN breweries AS T2 ON T1.brewery_id = T2.id WHERE T1.ibu IS NOT NULL AND T1.ibu = ( SELECT MIN(ibu) FROM beers )

Database: coinmarketcap
Question: What was the price of Bitcoin when it closed at the end of the day on 2013/4/29?
Evidence: price when it closed refers to close; on 2013/4/29 refers to date = '2013-04-29'
SQL: SELECT T2.close FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2013-04-29' AND T1.name = 'Bitcoin'