Database: talkingdata
Question: List at least 10 device models that male users over the age of 39 usually use.
Evidence: male refers to gender = 'M'; over the age of 39 refers to group = 'M39+';
SQL: SELECT T1.device_model FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T1.device_id = T2.device_id WHERE T2.`group` = 'M39+' AND T2.gender = 'M' LIMIT 10

Database: regional_sales
Question: What type of store is most popular in the South?
Evidence: in the South refers to Region = 'South'; type of store that is most popular refers to Max(Count(Type))
SQL: SELECT DISTINCT CASE WHEN MAX(T2.Population) THEN T2.Type END FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode

Database: retails
Question: How many customers from the furniture segments come from Iraq?
Evidence: furniture segment refers to c_mktsegment = 'FURNITURE'; Iraq refers to n_name = 'Iraq'
SQL: SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_mktsegment = 'FURNITURE' AND T2.n_name = 'IRAQ'

Database: codebase_comments
Question: How many solutions does the repository which has 1445 Forks contain?
Evidence: solutions refers to Solution.Id; repository refers to Repository.Id;
SQL: SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Forks = 1445

Database: food_inspection_2
Question: Provide the first name of employee who did inspection ID 48225?
SQL: SELECT T1.first_name FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.inspection_id = 48225

Database: movie_3
Question: What is the average amount of money spent by a customer in Italy on a single film rental?
Evidence: Italy refers to country = 'Italy'; average amount = divide(sum(amount), count(customer_id)) where country = 'Italy'
SQL: SELECT AVG(T5.amount) FROM address AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN country AS T3 ON T2.country_id = T3.country_id INNER JOIN customer AS T4 ON T1.address_id = T4.address_id INNER JOIN payment AS T5 ON T4.customer_id = T5.customer_id WHERE T3.country = 'Italy'

Database: simpson_episodes
Question: Write the title and all the keywords of the episode that was aired on 3/22/2009.
Evidence: aired on 3/22/2009 refers to air_date = '2009-03-22'
SQL: SELECT T1.title, T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.air_date = '2009-03-22';

Database: movie_3
Question: In the film with an inventory ID between 20 to 60, how many of the films have a G rating?
Evidence: G rating refers to rating = 'G'
SQL: SELECT COUNT(T1.film_id) FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T2.inventory_id BETWEEN 20 AND 60 AND T1.rating = 'G'

Database: video_games
Question: How many Sports games did Nintendo publish?
Evidence: Sports games refers to game_name WHERE genre_name = 'Sports'; Nintendo refers to publisher_name = 'Nintendo';
SQL: SELECT COUNT(T3.id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game AS T3 ON T2.game_id = T3.id INNER JOIN genre AS T4 ON T3.genre_id = T4.id WHERE T4.genre_name = 'Sports' AND T1.publisher_name = 'Nintendo'

Database: music_platform_2
Question: Of the arts-books and arts-design categories, which one has more podcasts and what is the numerical difference between them?
Evidence: arts-books' and 'arts-design' are category; numerical difference = Subtract(Count(podcast_id(category = 'arts-books')), Count(podcast_id(category = 'arts-design'))); one has much more podcast refers to Max(Count(podcast_id))
SQL: SELECT ( SELECT category FROM categories WHERE category = 'arts-books' OR category = 'arts-design' GROUP BY category ORDER BY COUNT(podcast_id) DESC LIMIT 1 ) "has more podcasts" , ( SELECT SUM(CASE WHEN category = 'arts-books' THEN 1 ELSE 0 END) - SUM(CASE WHEN category = 'arts-design' THEN 1 ELSE 0 END) FROM categories ) "differenct BETWEEN arts-books and arts-design"

Database: video_games
Question: Which publisher has published the most games?
Evidence: publisher refers to publisher_name; the most games refers to max(count(game_id))
SQL: SELECT T.publisher_name FROM ( SELECT T2.publisher_name, COUNT(DISTINCT T2.id) FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id GROUP BY T1.publisher_id ORDER BY COUNT(T2.id) DESC LIMIT 1 ) t

Database: citeseer
Question: List all the paper ID and its class type that cited the word 'word1002'.
Evidence: class type refers to class_label;
SQL: SELECT T1.paper_id, T1.class_label FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id WHERE T2.word_cited_id = 'word1002'

Database: simpson_episodes
Question: Please indicate the keywords of the title "Double, Double, Boy in Trouble".
SQL: SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Double, Double, Boy in Trouble';

Database: beer_factory
Question: What brand of beer has been the worst rated most times?
Evidence: brand of beer refers to BrandName; worst rated most times refers to MAX(COUNT(StarRating = 1));
SQL: SELECT T1.BrandName FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T2.BrandID = T1.BrandID WHERE T2.StarRating = 1 GROUP BY T1.BrandName ORDER BY COUNT(T1.BrandName) DESC LIMIT 1

Database: law_episode
Question: Which episode number has the second highest positive viewer comments and has been awarded "Best Television Episode"?
Evidence: episode number refers to episode_id; awarded "Best Television Episode" refers to award = 'Best Television Episode' and result = 'Winner'; the second highest positive viewer comments refers to rating = 8.5
SQL: SELECT T2.episode_id FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.award = 'Best Television Episode' AND T1.result = 'Winner' ORDER BY T2.rating DESC LIMIT 2

Database: shipping
Question: What is the customer's address for the shipment with ship ID 1117?
SQL: SELECT T2.address FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T1.ship_id = '1117'

Database: movie_3
Question: Give the full name of the actor with the highest rental rate.
Evidence: full name refers to first_name, last_name; the highest rental rate refers to max(rental_rate)
SQL: SELECT T1.first_name, T1.last_name FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T3.film_id = T2.film_id ORDER BY T3.rental_rate DESC LIMIT 1

Database: law_episode
Question: In what year did the episodes titled DWB get an award?
Evidence: titled DWB refers to title = 'DWB'; get an award refers to result = 'Winner'
SQL: SELECT DISTINCT T1.year FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T2.title = 'DWB' AND T1.result = 'Winner'

Database: legislator
Question: Please list the official full names of all the current legislators who do not have an account on C-SPAN's video website.
Evidence: legislators who do not have an account refers to cspan_id IS NULL OR cspan_id = ''
SQL: SELECT official_full_name FROM current WHERE cspan_id IS NULL OR cspan_id = ''

Database: food_inspection_2
Question: How many grocery stores paid $250 fine upon their inspection?
Evidence: grocery store refers to facility_type = 'Grocery Store'; $250 fine refers to fine = 250
SQL: SELECT COUNT(DISTINCT T1.license_no) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN violation AS T3 ON T2.inspection_id = T3.inspection_id WHERE T1.facility_type = 'Grocery Store' AND T3.fine = 250