Database: law_episode
Question: How many episodes did J.K. Simmons' role appear on the show?
SQL: SELECT COUNT(T1.role) FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id WHERE T2.name = 'J.K. Simmons'

Database: olympics
Question: What is the percentage of female athletes below 20s who participated in the 2002 Winter Olympic?
Evidence: DIVIDE(COUNT(person_id where gender = 'F' and age < 20), COUNT(person_id)) as percentage where games_name = '2002 Winter';
SQL: SELECT CAST(COUNT(CASE WHEN T3.gender = 'F' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.games_name = '2002 Winter' AND T2.age < 20

Database: student_loan
Question: How many students are enlisted in the Peace Corps organization are enrolled in UCSD school?
Evidence: enlisted in the Peace Corps refers to organ = 'peace_corps'; enrolled in UCSD school refers to school = 'ucsd';
SQL: SELECT COUNT(T1.name) FROM enlist AS T1 INNER JOIN enrolled AS T2 ON T1.name = T2.name WHERE T1.organ = 'peace_corps' AND T2.school = 'ucsd'

Database: movies_4
Question: List the movies in the Somali language.
Evidence: List the movies refers to title; Somali language refers to language_name = 'Somali'
SQL: SELECT T1.title FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id WHERE T3.language_name = 'Somali'

Database: video_games
Question: List down the name of games published by 3DO.
Evidence: name of game refers to game_name; published by 3DO refers to publisher_name = '3DO'
SQL: SELECT T1.game_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id WHERE T3.publisher_name = '3DO'

Database: movielens
Question: Which Crime film got the lowest average rating?
SQL: SELECT T2.movieid FROM u2base AS T2 INNER JOIN movies2directors AS T3 ON T2.movieid = T3.movieid WHERE T3.genre = 'Crime' GROUP BY T2.movieid ORDER BY AVG(T2.rating) LIMIT 1

Database: movie_platform
Question: How many critics were given to the movie that got the most movie popularity number.
Evidence: most movie popularity number refers to MAX(movie_popularity)
SQL: SELECT COUNT(T1.critic) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_popularity = ( SELECT MAX(movie_popularity) FROM movies )

Database: retails
Question: Which part is ordered in a bigger amount in order no.1, "burnished seashell gainsboro navajo chocolate" or "salmon white grey tan navy"?
Evidence: amount refers to sum(l_quantity); order no.1 refers to l_orderkey = 1; "burnished seashell gainsboro navajo chocolate" or "salmon white grey tan navy" refers to p_name IN ('salmon white grey tan navy', 'burnished seashell gainsboro navajo chocolate')
SQL: SELECT T.p_name FROM ( SELECT T2.p_name, SUM(T1.l_quantity) AS num FROM lineitem AS T1 INNER JOIN part AS T2 ON T1.l_partkey = T2.p_partkey WHERE T2.p_name IN ('salmon white grey tan navy', 'burnished seashell gainsboro navajo chocolate') GROUP BY T1.l_partkey ) AS T ORDER BY T.num DESC LIMIT 1

Database: address
Question: Which city and state has the bad alias of Lawrenceville?
Evidence: "Lawrenceville" is the bad_alias
SQL: SELECT T2.city, T2.state FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.bad_alias = 'Lawrenceville' GROUP BY T2.city, T2.state

Database: simpson_episodes
Question: Among the episode with highest votes, what is the category credited to Carlton Batten?
Evidence: highest votes refers to max(votes); to Carlton Batten refers to person = 'Carlton Batten'
SQL: SELECT T2.category FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.person = 'Carlton Batten' AND T2.credited = 'true' ORDER BY T1.votes DESC LIMIT 1;

Database: soccer_2016
Question: Tally the match IDs in which V Kohli is the "Man of the Match".
SQL: SELECT T1.Match_Id FROM `Match` AS T1 INNER JOIN Player AS T2 ON T1.Man_of_the_Match = T2.Player_Id WHERE T2.Player_Name = 'V Kohli'

Database: movie
Question: In rated PG movies, how many of them released in June 1990?
Evidence: rated PG refers to MPAA Rating = 'PG'; released in June 1990 refers to Release Date BETWEEN '1990-06-01' and '1990-06-30'
SQL: SELECT COUNT(*) FROM movie WHERE `MPAA Rating` = 'PG' AND `Release Date` LIKE '1990-06%'

Database: cookbook
Question: Calculate the percentage of recipes with no cholesterol included and have a cooking time less than 20 minutes among all recipes.
Evidence: no cholesterol refers to cholestrl = 0; cooking time less than 20 minutes refers to cook_min < 20; calculation = MULTIPLY(DIVIDE(COUNT(cholestrl = 0 THEN recipe_id), COUNT(recipe_id)), 100)
SQL: SELECT CAST(SUM(CASE WHEN T1.cook_min < 20 AND T2.cholestrl = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id

Database: shakespeare
Question: What are the character names in paragraph 3?
Evidence: character names refers to CharName; paragraph 3 refers to ParagraphNum = 3
SQL: SELECT DISTINCT T1.CharName FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.ParagraphNum = 3

Database: authors
Question: What is the name of the co-authors of the paper titled 'Particle identification using the time-over-threshold method in the ATLAS Transition Radiation Tracker'?
Evidence: paper titled 'Particle identification using the time-over-threshold method in the ATLAS Transition Radiation Tracker' refers to Title = 'Particle identification using the time-over-threshold method in the ATLAS Transition Radiation Tracker'
SQL: SELECT T1.Name FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T2.Title = 'Particle identification using the time-over-threshold method in the ATLAS Transition Radiation Tracker'

Database: olympics
Question: What is the sport name of "Cross Country Skiing Men's 10/15 kilometres Pursuit" event?
Evidence: "Cross Country Skiing Men's 10/15 kilometres Pursuit" refers to event_name = 'Cross Country Skiing Men''s 10/15 kilometres Pursuit';
SQL: SELECT T1.sport_name FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id WHERE T2.event_name LIKE 'Cross Country Skiing Men%s 10/15 kilometres Pursuit'

Database: movie
Question: Please list the names of the characters in the movie Look Who's Talking.
Evidence: movie Look Who's Talking refers to title = 'Look Who's Talking'
SQL: SELECT T2.`Character Name` FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID WHERE T1.Title = 'Look Who''s Talking'

Database: olympics
Question: State the event name of Basketball.
Evidence: basketball refers to sport_name = 'Basketball';
SQL: SELECT T2.event_name FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id WHERE T1.sport_name = 'Basketball'

Database: image_and_language
Question: Define the bounding box of the object sample no. 7 on image no. 42.
Evidence: bounding box of the object refers to (X, Y, W, H); sample no.7 on image no.42 refers to IMG_ID = 42 and OBJ_SAMPLE_ID = 7
SQL: SELECT X, Y, W, H FROM IMG_OBJ WHERE IMG_ID = 42 AND OBJ_SAMPLE_ID = 7

Database: legislator
Question: Who is the Lutheran representative that served in the state of Ohio for 14 years before becoming a senator?
Evidence: Lutheran refers to religion_bio = 'Lutheran'; representative refers to type = 'rep'; served for 14 years refers to SUBTRACT(SUM(CAST(strftime('%Y', end)), CAST(strftime('%Y', start)))) = 14;
SQL: SELECT CASE WHEN SUM(CAST(strftime('%Y', T2.end) AS int) - CAST(strftime('%Y', T2.start) AS int)) = 14 THEN official_full_name END FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.religion_bio = 'Lutheran' AND T2.state = 'OH' AND T2.type = 'rep'