1sf/bird-sql-train-with-schema huggingface dataset:
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: What is the title of the 3 worst rated episodes?
Evidence: worst rated refers to min(rating)
SQL: SELECT title FROM Episode ORDER BY rating LIMIT 3
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: What is the full place of birth of Rene Chenevert Balcer?
Evidence: full place of birth refers to birth_place, birth_region; Rene Chenevert Balcer refers to birth_name = 'Rene Chenevert Balcer'
SQL: SELECT birth_place, birth_region FROM Person WHERE birth_name = 'Rene Chenevert Balcer'
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: What is the name of the actors born in the USA?
Evidence: born in the USA refers to birth_country = 'USA'
SQL: SELECT name FROM Person WHERE birth_country = 'USA'
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: What is the title of the episodes that were least enjoyed?
Evidence: least enjoyed refers to stars = 1
SQL: SELECT T1.title FROM Episode AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id WHERE T2.stars = 1
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: What are the names of the two people who won an award for their role as directors?
Evidence: won an award refers to result = 'Winner'; role as director refers to role = 'director'
SQL: SELECT T1.name FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id WHERE T2.Result = 'Winner' AND T2.role = 'director'
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: How many votes did the episode titled Juvenile get?
Evidence: the episode titled Juvenile refers to title = 'Juvenile'
SQL: SELECT SUM(T2.votes) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Juvenile'
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: In which episodes was Anthony Azzara not credited?
Evidence: which episode refers to title; not credited refers to credited = ''
SQL: SELECT T1.title FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Person AS T3 ON T3.person_id = T2.person_id WHERE T2.credited = 'false' AND T3.name = 'Anthony Azzara'
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
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: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: In which region were the assistant location managers born?
Evidence: region refers to birth_region; assistant location manager refers to role = 'assistant location manager'
SQL: SELECT T2.birth_region FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id WHERE T1.role = 'president of NBC West Coast'
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: How many stars did the episodes in which Donna Villella worked?
SQL: SELECT COUNT(T3.person_id) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Person AS T3 ON T3.person_id = T2.person_id WHERE T3.name = 'Donna Villella'
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: What role was Julia Roberts nominated for?
Evidence: nominated refers to result = 'Nominee'
SQL: SELECT T2.role FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id WHERE T2.Result = 'Nominee' AND T1.name = 'Julia Roberts'
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: What role does the tallest person play?
Evidence: the tallest refers to max(height_meters)
SQL: SELECT T2.role FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.person_id = T2.person_id INNER JOIN Award AS T3 ON T2.episode_id = T3.episode_id ORDER BY T1.height_meters DESC LIMIT 1
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: What is the title of the episode with the most nominations?
Evidence: the most nominations refers to max(count(episode_id where result = 'Nominee'))
SQL: SELECT T2.title FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.result = 'Nominee' GROUP BY T2.episode_id ORDER BY COUNT(T1.result) DESC LIMIT 1
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: What was the rating of the episodes that Jace Alexander worked on?
SQL: SELECT T1.rating FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Person AS T3 ON T3.person_id = T2.person_id WHERE T3.name = 'Jace Alexander'
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: What are the names of all the people who worked on episode 19 of season 9?
SQL: SELECT T3.name FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Person AS T3 ON T3.person_id = T2.person_id WHERE T1.episode = 19 AND T1.season = 9
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: What is the average star rating of the episodes Jim Bracchitta has worked on?
Evidence: average star rating = divide(sum(stars), count(episode_id)) where name = 'Jim Bracchitta'
SQL: SELECT CAST(SUM(T3.stars) AS REAL) / COUNT(T2.episode_id) FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.person_id = T2.person_id INNER JOIN Vote AS T3 ON T2.episode_id = T3.episode_id WHERE T3.stars = 1 AND T1.name = 'Jim Bracchitta'
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: What percentage of people have worked on the True North episode as additional crew?
Evidence: the True North episode refers to title = 'True North'; additional crew refers to role = 'Additional Crew'; percentage = divide(count(episode_id where role = 'Additional Crew'), count(episode_id)) * 100% where title = 'True North'
SQL: SELECT CAST(SUM(CASE WHEN T2.role = 'Additional Crew' THEN 1 ELSE 0 END) AS REAL ) * 100 / COUNT(T1.episode_id) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'True North'
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: Write down the title, summary, and air date of the episode that garnered 72 10-star votes.
Evidence: 72 10-star votes refers to stars = 10 and votes = 72
SQL: SELECT T2.title, T2.summary, T2.air_date FROM Vote AS T1 INNER JOIN Episode AS T2 ON T2.episode_id = T1.episode_id WHERE T1.stars = 10 AND T1.votes = 72
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: How many 6-star votes did episode 12 get? Please include the air date and rating.
Evidence: 6-star vote refers to stars = 6
SQL: SELECT T2.air_date, T2.rating FROM Vote AS T1 INNER JOIN Episode AS T2 ON T2.episode_id = T1.episode_id WHERE T1.stars = 6 AND T2.episode = 12
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: Who is the winner of the Best Television Episode award for the Edgar category in 2000? Include his or her name and role.
Evidence: the Best Television Episode award refers to award = 'Best Television Episode'; the Edgar category refers to award_category = 'Edgar'; in 2000 refers to year = 2000
SQL: SELECT T1.name, T2.role FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id WHERE T2.year = 2000 AND T2.award_category = 'Edgar' AND T2.award = 'Best Television Episode'
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: Write down the organization, year, award, and award category in which Rene Balcer is the winner.
Evidence: Rene Balcer refers to name = 'Rene Balcer'; the winner refers to result = 'Winner'
SQL: SELECT T2.organization, T2.year, T2.award, T2.award_category FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id WHERE T1.name = 'Rene Balcer' AND T2.result = 'Winner'
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: Give me the years and episode IDs in which Constantine Makris was the winner of the Television Silver Gavel Award at the American Bar Association Silver Gavel Awards for Media and the Arts for two consecutive years.
Evidence: the winner refers to result = 'Winner'; the Television refers to award = 'Television'; Silver Gavel Award refers to award_category = 'Silver Gavel Award'; the American Bar Association Silver Gavel Awards for Media and the Arts refers to organization = 'American Bar Association Silver Gavel Awards for Media and the Arts'
SQL: SELECT t3.years, t3.episode_id FROM ( SELECT DISTINCT T2.year AS years, T2.episode_id, row_number() OVER (PARTITION BY T2.episode_id ORDER BY T2.year) AS rm FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id WHERE T2.award = 'Television' AND T2.award_category = 'Silver Gavel Award' AND T1.name = 'Constantine Makris' AND T2.result = 'Winner' AND T2.organization = 'American Bar Association Silver Gavel Awards for Media and the Arts' ) AS T3 GROUP BY t3.episode_id HAVING COUNT(t3.years - t3.rm) >= 2
Database: law_episode
Tables: Episode, Keyword, Person, Award, Credit, Vote
Columns (table index, column name): -1, *, 0, episode_id, 0, series, 0, season, 0, episode, 0, number_in_series, 0, title, 0, summary, 0, air_date, 0, episode_image, 0, rating, 0, votes, 1, episode_id, 1, keyword, 2, person_id, 2, name, 2, birthdate, 2, birth_name, 2, birth_place, 2, birth_region, 2, birth_country, 2, height_meters, 2, nickname, 3, award_id, 3, organization, 3, year, 3, award_category, 3, award, 3, series, 3, episode_id, 3, person_id, 3, role, 3, result, 4, episode_id, 4, person_id, 4, category, 4, role, 4, credited, 5, episode_id, 5, stars, 5, votes, 5, percent
Question: Who was the Law and Order series writer who also won the Television Silver Gavel Award at the American Bar Association Silver Gavel Awards for Media and the Arts for two consecutive years?
Evidence: who refers to name; writer refers to role = 'writer'; won refers to result = 'Winner'; the Television refers to award = 'Television'; Silver Gavel Award refers to award_category = 'Silver Gavel Award'; the American Bar Association Silver Gavel Awards for Media and the Arts refers to organization = 'American Bar Association Silver Gavel Awards for Media and the Arts'
SQL: SELECT t3.name FROM ( SELECT DISTINCT T2.year AS years, T1.name, row_number() OVER (PARTITION BY T1.name ORDER BY T2.year) AS rm FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id WHERE T2.award = 'Television' AND T2.award_category = 'Silver Gavel Award' AND T2.series = 'Law and Order' AND T2.result = 'Winner' AND T2.organization = 'American Bar Association Silver Gavel Awards for Media and the Arts' ) AS T3 GROUP BY t3.name HAVING COUNT(t3.years - t3.rm) >= 2