Database: simpson_episodes
Question: List down the award name, result, credit category and credited status of the "Billy Kimball".
Evidence: "Billy Kimball" is the person; award name refers to award; credited category refers to category; credited status refers to credited; credited = 'true' means the person is included in the credit list and vice versa
SQL: SELECT DISTINCT T1.award, T1.result, T2.category, T2.credited FROM Award AS T1 INNER JOIN Credit AS T2 ON T2.episode_id = T1.episode_id WHERE T2.person = 'Billy Kimball';

Database: restaurant
Question: How many Chinese restaurants are there on 1st st, Livermore?
Evidence: Chinese restaurant refers to food_type = 'chinese'; 1st st refers to street_name = '1st st'; Livermore refers to city = 'livermore'
SQL: SELECT COUNT(T1.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'livermore' AND T1.food_type = 'chinese' AND T2.street_name = '1st st'

Database: address
Question: For the county represented by Thompson Bennie G, how many bad aliases does it have?
SQL: SELECT COUNT(DISTINCT T2.bad_alias) FROM zip_congress AS T1 INNER JOIN avoid AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T1.district = T3.cognress_rep_id WHERE T3.first_name = 'Thompson' AND T3.last_name = 'Bennie G'

Database: movie_3
Question: How many films rented to the customer RUTH MARTINEZ were returned in August, 2005?
Evidence: returned in August, 2005 refers to year(return_date) = 2005 and month (return_date) = 8
SQL: SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ' AND STRFTIME('%m',T2.return_date) = '8' AND STRFTIME('%Y', T2.return_date) = '2005'

Database: books
Question: What is the cheapest order price of the book "The Little House"?
Evidence: "The Little House" is the title of book; cheapest order price refers to Min(price)
SQL: SELECT MIN(T2.price) FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T1.title = 'The Little House'

Database: image_and_language
Question: Provide the dimensions of the bounding box that contains the keyboard that was spotted in image no. 3.
Evidence: dimensions of the bounding box refers to (W, H); keyboard refers to OBJ_CLASS = 'keyboard'; image no. 3 refers to IMG_ID = 3
SQL: SELECT T1.W, T1.H FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 3 AND T2.OBJ_CLASS = 'keyboard'

Database: movie_3
Question: What is the average rental rate of sci-fi film titles?
Evidence: sci-fi film refers to category.name = 'Sci-Fi'; average rental rate = avg(rental_rate)
SQL: SELECT AVG(T1.rental_rate) FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T3.category_id = T2.category_id WHERE T3.`name` = 'Sci-Fi'

Database: legislator
Question: What is the gender of the legislator whose address at 317 Russell Senate Office Building Washington DC 20510?
Evidence: gender refers to gender_bio
SQL: SELECT T1.gender_bio FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.address = '317 Russell Senate Office Building Washington DC 20510'

Database: software_company
Question: Which customer come from a place with more inhabitants, customer no.0 or customer no.1?
Evidence: place with more inhabitants refers to GEOID where ID = 0 OR ID = 1 and MAX(NHABITANTS_K);
SQL: SELECT T1.ID FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.ID = 0 OR T1.ID = 1 ORDER BY INHABITANTS_K DESC LIMIT 1

Database: airline
Question: What is the percentage of flights from Los Angeles International airport that were cancelled due to a type C cancellation code?
Evidence: percentage = MULTIPLY(DIVIDE(SUM(CANCELLATION_CODE = 'C'), COUNT(Code)), 100); flights from refers to ORIGIN; Los Angeles International airport refers to Description = 'Los Angeles, CA: Los Angeles International'; cancelled refers to Cancelled = 1; cancelled due to a type C cancellation code refers to CANCELLATION_CODE = 'C';
SQL: SELECT CAST(SUM(CASE WHEN T2.CANCELLATION_CODE = 'C' THEN 1.0 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN WHERE T2.FL_DATE = '2018/8/15' AND T2.CANCELLATION_CODE IS NOT NULL AND T1.Description = 'Los Angeles, CA: Los Angeles International'

Database: cs_semester
Question: Find the most important and most difficult courses.
Evidence: most important refers to MAX(credit); most difficult refers to MAX(diff);
SQL: SELECT name FROM course WHERE credit = ( SELECT MAX(credit) FROM course ) AND diff = ( SELECT MAX(diff) FROM course )

Database: retails
Question: List all the dates of the urgent orders.
Evidence: date refers to o_orderdate; urgent order refers to o_orderpriority = '1-URGENT'
SQL: SELECT o_orderdate FROM orders WHERE o_orderpriority = '1-URGENT'

Database: movie_platform
Question: Give the name of the movie that got the most "5" ratings.
Evidence: 5 ratings refers to rating_score = 5; name of the movie refers to movie_title
SQL: SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_score = 5

Database: shooting
Question: From the cases where the subject are male, list the case number and the location and subject status.
Evidence: male refers to gender = 'M'
SQL: SELECT T1.case_number, T1.location, T1.subject_statuses FROM incidents AS T1 INNER JOIN subjects AS T2 ON T1.case_number = T2.case_number WHERE T2.gender = 'M'

Database: shakespeare
Question: How many of Shakespeare's works were finished before the year 1602?
Evidence: finished before the year 1602 refers to Date < 1602
SQL: SELECT COUNT(id) FROM works WHERE Date < 1602

Database: social_media
Question: What is the text of the tweet that got the most `likes`?
Evidence: got the most like refers to Max(Likes)
SQL: SELECT text FROM twitter WHERE Likes = ( SELECT MAX( Likes) FROM twitter )

Database: movies_4
Question: Calculate the 2016 gap between the average revenue for Indian and American films.
Evidence: 2016 refers to release_date LIKE '2016%'; Indian and American films refers to country_name = 'India' and country_name = 'United States of America'; gap between the average revenue refers to subtract(divide(sum(revenue), count(movie_id)) when country_name = 'United States of America', divide(sum(revenue), count(movie_id)) when country_name = 'India')
SQL: SELECT AVG(CASE WHEN T3.COUNTry_name = 'United States of America' THEN T1.revenue END) - AVG(CASE WHEN T3.COUNTry_name = 'India' THEN T1.revenue END) AS CALCULATE FROM movie AS T1 INNER JOIN production_COUNTry AS T2 ON T1.movie_id = T2.movie_id INNER JOIN COUNTry AS T3 ON T2.COUNTry_id = T3.COUNTry_id WHERE CAST(STRFTIME('%Y', T1.release_date) AS INT) = 2016

Database: video_games
Question: What is the first year a game is released?
Evidence: the first year refers to min(release_year)
SQL: SELECT MIN(T.release_year) FROM game_platform t

Database: talkingdata
Question: How many female users use device model of MI 3?
Evidence: female refers to gender = 'F';
SQL: SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.gender = 'F' AND T2.device_model = 'MI 3'

Database: world_development_indicators
Question: What is the indicator code for Mobile Cellular Subscriptions of Brazil?
Evidence: Mobile Cellular Subscriptions refers to indicatorname = 'Mobile cellular subscriptions'; Brazil refers to CountryName = 'Brazil'
SQL: SELECT DISTINCT IndicatorCode FROM Indicators WHERE CountryName = 'Brazil' AND IndicatorName = 'Mobile cellular subscriptions'