Database: talkingdata
Question: How many male users are active in the events held on 5/1/2016?
Evidence: male refers to gender = 'M'; active refers to is_active = 1; on 5/1/2016 refers to timestamp LIKE '2016-05-01%';
SQL: SELECT COUNT(T3.gender) FROM app_events AS T1 INNER JOIN events_relevant AS T2 ON T2.event_id = T1.event_id INNER JOIN gender_age AS T3 ON T3.device_id = T2.device_id WHERE T1.is_active = 1 AND T3.gender = 'M' AND T2.timestamp LIKE '2016-05-01%'

Database: books
Question: Count the number of books written by Orson Scott Card.
Evidence: "Orson Scott Card" is the author_name
SQL: SELECT COUNT(*) FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'Orson Scott Card'

Database: synthea
Question: Mention the description of the care plan of American patients.
Evidence: American refers to ethnicity = 'american';
SQL: SELECT DISTINCT T1.DESCRIPTION FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.ethnicity = 'american'

Database: shooting
Question: What is the most common type of weapon that causes death?
Evidence: the most common type of weapon refers to max(count(subject_weapon)); causes death refers to subject_statuses = 'Deceased'
SQL: SELECT subject_weapon FROM incidents WHERE subject_statuses = 'Deceased' GROUP BY subject_weapon ORDER BY COUNT(case_number) DESC LIMIT 1

Database: movie
Question: Please list the names of all the characters played by Tom Cruise.
Evidence: played by Tom Cruise refers to name = 'Tom Cruise'
SQL: SELECT T1.`Character Name` FROM characters AS T1 INNER JOIN actor AS T2 ON T1.ActorID = T2.ActorID WHERE T2.Name = 'Tom Cruise'

Database: law_episode
Question: How many 10-star votes were given to the episode titled "Cherished"?
Evidence: 10-star vote refers to stars = 10; titled "Cherished" refers to title = 'Cherished'
SQL: SELECT T2.votes FROM Episode AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Cherished' AND T2.stars = 10

Database: address
Question: List down the names of the cities belonging to Noble, Oklahoma.
Evidence: the county of Noble is located in the state of Oklahoma;
SQL: SELECT T3.city FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state INNER JOIN zip_data AS T3 ON T2.zip_code = T3.zip_code WHERE T1.name = 'Oklahoma' AND T2.county = 'NOBLE'

Database: restaurant
Question: What percentage of streets named 11th Street are in Alameda County?
Evidence: street named 11th Street refers to street_name = '11th st'; percentage = divide(count(street_name = '11th st' and County = 'alameda county'), count(street_name where County = 'alameda county')) * 100%
SQL: SELECT CAST(SUM(IIF(T1.street_name = '11th st', 1, 0)) AS REAL) * 100 / COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.County = 'alameda county'

Database: authors
Question: What was the name of the paper that was published on "IEEE Transactions on Pattern Analysis and Machine Intelligence" in 2011?
Evidence: 'IEEE Transactions on Pattern Analysis and Machine Intelligence' is the FullName of journal; 2011 refers to Year = '2011'; name of the paper refers to Title of paper
SQL: SELECT T2.Title FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'IEEE Transactions on Pattern Analysis and Machine Intelligence' AND T2.Year = 2011 AND T2.Title <> ''

Database: app_store
Question: Which Photography app has the highest total Sentiment subjectivity score?
Evidence: Photography app refers to Genre = 'Photography'; highest total sentiment subjectivity score = MAX(sum(Sentiment_Subjectivity));
SQL: SELECT T1.App FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Genres = 'Photography' GROUP BY T1.App ORDER BY SUM(T2.Sentiment_Subjectivity) DESC LIMIT 1

Database: superstore
Question: In which segment does the customer who purchased the product from the east superstore with the highest original price belong?
Evidence: highest original price refers to max(divide(Sales, subtract(1, Discount)))
SQL: SELECT T2.Segment FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T1.Region = 'East' ORDER BY (T1.Sales / (1 - T1.Discount)) DESC LIMIT 1

Database: video_games
Question: How many games were released in 2001?
Evidence: released in 2001 refers to release_year = 2001
SQL: SELECT COUNT(T.id) FROM game_platform AS T WHERE T.release_year = 2001

Database: movie_3
Question: List down email address of customers who were attended by staff with ID 2.
Evidence: email address refers to email
SQL: SELECT DISTINCT T1.email FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T2.staff_id = 2

Database: video_games
Question: What are the names of games that were released in 2007?
Evidence: names of games refers to game_name; released in 2007 refers to release_year = 2007;
SQL: SELECT T3.game_name FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T1.release_year = 2007

Database: university
Question: How many universities are located in Japan?
Evidence: located in Japan refers to country_name = 'Japan';
SQL: SELECT COUNT(*) FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'Japan'

Database: movie_3
Question: Give the full name of the actor who acted in the most number of movies?
Evidence: full name refers to first_name, last_name; acted in the most number of movies refers to MAX(COUNT(film_id))
SQL: SELECT T.first_name, T.last_name FROM ( SELECT T2.first_name, T2.last_name, COUNT(T1.film_id) AS num FROM film_actor AS T1 INNER JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.first_name, T2.last_name ) AS T ORDER BY T.num DESC LIMIT 1

Database: legislator
Question: Give the district numbers with an Anti-Administration party.
SQL: SELECT district FROM `historical-terms` WHERE party = 'Anti-Administration' GROUP BY district

Database: food_inspection_2
Question: What is the full name of the employee with the lowest salary?
Evidence: full name refers to first_name, last_name; the lowest salary refers to min(salary)
SQL: SELECT first_name, last_name FROM employee ORDER BY salary ASC LIMIT 1

Database: sales_in_weather
Question: What was the average temperature differences during May 2012 for store number 6 and 7?
Evidence: during May 2012 refers to SUBSTR(date, 1, 7) = '2012-05'; store number 6 refers to store_nbr = 6; store number 7 refers to store_nbr = 7; average temperature difference = Subtract (Divide (Sum(tavg), Count (date) where the store_nbr = 6), Divide (Sum(tavg), Count(date) where store_nbr = 7))
SQL: SELECT ( SELECT CAST(SUM(tavg) AS REAL) / COUNT(`date`) FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr AND T1.`date` LIKE '%2012-05%' AND T2.store_nbr = 6 ) - ( SELECT CAST(SUM(tavg) AS REAL) / COUNT(`date`) FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T1.`date` LIKE '%2012-05%' AND T2.store_nbr = 7 )

Database: retail_world
Question: Which 3 products are produced in greater quantity?
Evidence: 3 products produced in greater quantity refer to MAX(SUM(UnitsInStock, UnitsOnOrder)) Limit 3;
SQL: SELECT ProductName FROM Products ORDER BY UnitsInStock + UnitsOnOrder DESC LIMIT 3

Database: sales
Question: List down all of the product names that were placed by sales person with id 10.
Evidence: id refers to SalesPersonID; SalesPersonID = 10
SQL: SELECT DISTINCT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.SalesPersonID = 10