1sf/bird-sql-train-with-schema huggingface dataset:
Database: professional_basketball
Tables: awards_players, coaches, draft, player_allstar, players, teams, awards_coaches, players_teams, series_post
Columns (table index, column name): -1, *, 0, playerID, 0, award, 0, year, 0, lgID, 0, note, 0, pos, 1, coachID, 1, year, 1, tmID, 1, lgID, 1, stint, 1, won, 1, lost, 1, post_wins, 1, post_losses, 2, id, 2, draftYear, 2, draftRound, 2, draftSelection, 2, draftOverall, 2, tmID, 2, firstName, 2, lastName, 2, suffixName, 2, playerID, 2, draftFrom, 2, lgID, 3, playerID, 3, last_name, 3, first_name, 3, season_id, 3, conference, 3, league_id, 3, games_played, 3, minutes, 3, points, 3, o_rebounds, 3, d_rebounds, 3, rebounds, 3, assists, 3, steals, 3, blocks, 3, turnovers, 3, personal_fouls, 3, fg_attempted, 3, fg_made, 3, ft_attempted, 3, ft_made, 3, three_attempted, 3, three_made, 4, playerID, 4, useFirst, 4, firstName, 4, middleName, 4, lastName, 4, nameGiven, 4, fullGivenName, 4, nameSuffix, 4, nameNick, 4, pos, 4, firstseason, 4, lastseason, 4, height, 4, weight, 4, college, 4, collegeOther, 4, birthDate, 4, birthCity, 4, birthState, 4, birthCountry, 4, highSchool, 4, hsCity, 4, hsState, 4, hsCountry, 4, deathDate, 4, race, 5, year, 5, lgID, 5, tmID, 5, franchID, 5, confID, 5, divID, 5, rank, 5, confRank, 5, playoff, 5, name, 5, o_fgm, 5, o_ftm, 5, o_pts, 5, d_pts, 5, homeWon, 5, homeLost, 5, awayWon, 5, awayLost, 5, won, 5, lost, 5, games, 5, arena, 6, id, 6, year, 6, coachID, 6, award, 6, lgID, 6, note, 7, id, 7, playerID, 7, year, 7, stint, 7, tmID, 7, lgID, 7, GP, 7, GS, 7, minutes, 7, points, 7, oRebounds, 7, dRebounds, 7, rebounds, 7, assists, 7, steals, 7, blocks, 7, turnovers, 7, PF, 7, fgAttempted, 7, fgMade, 7, ftAttempted, 7, ftMade, 7, threeAttempted, 7, threeMade, 7, PostGP, 7, PostGS, 7, PostMinutes, 7, PostPoints, 7, PostoRebounds, 7, PostdRebounds, 7, PostRebounds, 7, PostAssists, 7, PostSteals, 7, PostBlocks, 7, PostTurnovers, 7, PostPF, 7, PostfgAttempted, 7, PostfgMade, 7, PostftAttempted, 7, PostftMade, 7, PostthreeAttempted, 7, PostthreeMade, 7, note, 8, id, 8, year, 8, round, 8, series, 8, tmIDWinner, 8, lgIDWinner, 8, tmIDLoser, 8, lgIDLoser, 8, W, 8, L
Question: For the 2001 rebounds leader in the league, when was his birthday?
Evidence: 2001 refers to year = 2001; rebounds leader refers to max(rebounds); birthday refers to birthDate
SQL: SELECT birthDate FROM players WHERE playerID = ( SELECT playerID FROM players_teams WHERE year = 2001 GROUP BY playerID ORDER BY SUM(rebounds + dRebounds) DESC LIMIT 1 )
Database: professional_basketball
Tables: awards_players, coaches, draft, player_allstar, players, teams, awards_coaches, players_teams, series_post
Columns (table index, column name): -1, *, 0, playerID, 0, award, 0, year, 0, lgID, 0, note, 0, pos, 1, coachID, 1, year, 1, tmID, 1, lgID, 1, stint, 1, won, 1, lost, 1, post_wins, 1, post_losses, 2, id, 2, draftYear, 2, draftRound, 2, draftSelection, 2, draftOverall, 2, tmID, 2, firstName, 2, lastName, 2, suffixName, 2, playerID, 2, draftFrom, 2, lgID, 3, playerID, 3, last_name, 3, first_name, 3, season_id, 3, conference, 3, league_id, 3, games_played, 3, minutes, 3, points, 3, o_rebounds, 3, d_rebounds, 3, rebounds, 3, assists, 3, steals, 3, blocks, 3, turnovers, 3, personal_fouls, 3, fg_attempted, 3, fg_made, 3, ft_attempted, 3, ft_made, 3, three_attempted, 3, three_made, 4, playerID, 4, useFirst, 4, firstName, 4, middleName, 4, lastName, 4, nameGiven, 4, fullGivenName, 4, nameSuffix, 4, nameNick, 4, pos, 4, firstseason, 4, lastseason, 4, height, 4, weight, 4, college, 4, collegeOther, 4, birthDate, 4, birthCity, 4, birthState, 4, birthCountry, 4, highSchool, 4, hsCity, 4, hsState, 4, hsCountry, 4, deathDate, 4, race, 5, year, 5, lgID, 5, tmID, 5, franchID, 5, confID, 5, divID, 5, rank, 5, confRank, 5, playoff, 5, name, 5, o_fgm, 5, o_ftm, 5, o_pts, 5, d_pts, 5, homeWon, 5, homeLost, 5, awayWon, 5, awayLost, 5, won, 5, lost, 5, games, 5, arena, 6, id, 6, year, 6, coachID, 6, award, 6, lgID, 6, note, 7, id, 7, playerID, 7, year, 7, stint, 7, tmID, 7, lgID, 7, GP, 7, GS, 7, minutes, 7, points, 7, oRebounds, 7, dRebounds, 7, rebounds, 7, assists, 7, steals, 7, blocks, 7, turnovers, 7, PF, 7, fgAttempted, 7, fgMade, 7, ftAttempted, 7, ftMade, 7, threeAttempted, 7, threeMade, 7, PostGP, 7, PostGS, 7, PostMinutes, 7, PostPoints, 7, PostoRebounds, 7, PostdRebounds, 7, PostRebounds, 7, PostAssists, 7, PostSteals, 7, PostBlocks, 7, PostTurnovers, 7, PostPF, 7, PostfgAttempted, 7, PostfgMade, 7, PostftAttempted, 7, PostftMade, 7, PostthreeAttempted, 7, PostthreeMade, 7, note, 8, id, 8, year, 8, round, 8, series, 8, tmIDWinner, 8, lgIDWinner, 8, tmIDLoser, 8, lgIDLoser, 8, W, 8, L
Question: Which team did the all league rebound champion play in 1997? Give the full name of the team.
Evidence: rebound champion refers to max(rebounds); 1997 refers to 1997; full name refers to teams.name
SQL: SELECT T1.name FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T2.year = 1997 GROUP BY T1.name ORDER BY SUM(rebounds + dRebounds) DESC LIMIT 1
Database: professional_basketball
Tables: awards_players, coaches, draft, player_allstar, players, teams, awards_coaches, players_teams, series_post
Columns (table index, column name): -1, *, 0, playerID, 0, award, 0, year, 0, lgID, 0, note, 0, pos, 1, coachID, 1, year, 1, tmID, 1, lgID, 1, stint, 1, won, 1, lost, 1, post_wins, 1, post_losses, 2, id, 2, draftYear, 2, draftRound, 2, draftSelection, 2, draftOverall, 2, tmID, 2, firstName, 2, lastName, 2, suffixName, 2, playerID, 2, draftFrom, 2, lgID, 3, playerID, 3, last_name, 3, first_name, 3, season_id, 3, conference, 3, league_id, 3, games_played, 3, minutes, 3, points, 3, o_rebounds, 3, d_rebounds, 3, rebounds, 3, assists, 3, steals, 3, blocks, 3, turnovers, 3, personal_fouls, 3, fg_attempted, 3, fg_made, 3, ft_attempted, 3, ft_made, 3, three_attempted, 3, three_made, 4, playerID, 4, useFirst, 4, firstName, 4, middleName, 4, lastName, 4, nameGiven, 4, fullGivenName, 4, nameSuffix, 4, nameNick, 4, pos, 4, firstseason, 4, lastseason, 4, height, 4, weight, 4, college, 4, collegeOther, 4, birthDate, 4, birthCity, 4, birthState, 4, birthCountry, 4, highSchool, 4, hsCity, 4, hsState, 4, hsCountry, 4, deathDate, 4, race, 5, year, 5, lgID, 5, tmID, 5, franchID, 5, confID, 5, divID, 5, rank, 5, confRank, 5, playoff, 5, name, 5, o_fgm, 5, o_ftm, 5, o_pts, 5, d_pts, 5, homeWon, 5, homeLost, 5, awayWon, 5, awayLost, 5, won, 5, lost, 5, games, 5, arena, 6, id, 6, year, 6, coachID, 6, award, 6, lgID, 6, note, 7, id, 7, playerID, 7, year, 7, stint, 7, tmID, 7, lgID, 7, GP, 7, GS, 7, minutes, 7, points, 7, oRebounds, 7, dRebounds, 7, rebounds, 7, assists, 7, steals, 7, blocks, 7, turnovers, 7, PF, 7, fgAttempted, 7, fgMade, 7, ftAttempted, 7, ftMade, 7, threeAttempted, 7, threeMade, 7, PostGP, 7, PostGS, 7, PostMinutes, 7, PostPoints, 7, PostoRebounds, 7, PostdRebounds, 7, PostRebounds, 7, PostAssists, 7, PostSteals, 7, PostBlocks, 7, PostTurnovers, 7, PostPF, 7, PostfgAttempted, 7, PostfgMade, 7, PostftAttempted, 7, PostftMade, 7, PostthreeAttempted, 7, PostthreeMade, 7, note, 8, id, 8, year, 8, round, 8, series, 8, tmIDWinner, 8, lgIDWinner, 8, tmIDLoser, 8, lgIDLoser, 8, W, 8, L
Question: Which team had more than one player who grabbed more than 600 rebounds in 2011? Give the full name of the team.
Evidence: more than one player refers to count(playerID) > 1; grabbed more than 600 rebounds refers to rebounds > 600; in 2011 refers to 2011; full name refers to teams.name
SQL: SELECT T1.tmID FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = 2011 AND T2.rebounds > 600
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
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: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: How many scenes are there in Act 1 in Twelfth Night?
Evidence: Twelfth Night refers to Title = 'Twelfth Night'
SQL: SELECT COUNT(T1.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Act = 1 AND T1.Title = 'Twelfth Night'
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: What is the description of Act 1, Scene 2 in Twelfth Night?
Evidence: Twelfth Night refers to Title = 'Twelfth Night'
SQL: SELECT T2.Description FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Twelfth Night' AND T2.Act = 1 AND T2.Scene = 2
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: How many more scenes are there in Act 1 than in Act 5 in Twelfth Night?
Evidence: in Twelfth Night refers to Title = 'Twelfth Night'; How many more scenes = subtract(sum(Act = 1), sum(Act = 5))
SQL: SELECT SUM(IIF(T2.Act = 1, 1, 0)) - SUM(IIF(T2.Act = 5, 1, 0)) AS more FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Twelfth Night'
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: Which work is the character Lord Abergavenny from? Please give its short or abbreviated title.
Evidence: Lord Abergavenny refers to CharName = 'Lord Abergavenny'; short or abbreviated title refers to Title
SQL: SELECT DISTINCT T1.Title FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T4.CharName = 'Lord Abergavenny'
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: Please list the character names of all the characters from the work Twelfth Night.
Evidence: character names refers to CharName; Twelfth Night refers to Title = 'Twelfth Night'
SQL: SELECT DISTINCT T4.CharName FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T1.Title = 'Twelfth Night'
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: How many paragraphs are there in Act 1, Scene 1 in Twelfth Night?
Evidence: Twelfth Night refers to Title = 'Twelfth Night'
SQL: SELECT SUM(T3.ParagraphNum) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id WHERE T2.Act = 1 AND T2.Scene = 1 AND T1.Title = 'Twelfth Night'
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: Please list all the paragraphs in Act 1, Scene 1 in Twelfth Night.
Evidence: Twelfth Night refers to Title = 'Twelfth Night'; list the paragraphs refers to PlainText
SQL: SELECT T3.PlainText FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id WHERE T2.Act = 1 AND T2.Scene = 1 AND T1.Title = 'Twelfth Night'
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: How many paragraphs contain the character Lord Abergavenny?
Evidence: Lord Abergavenny refers to CharName = 'Lord Abergavenny'
SQL: SELECT SUM(T1.ParagraphNum) FROM paragraphs AS T1 INNER JOIN characters AS T2 ON T1.character_id = T2.id WHERE T2.CharName = 'Lord Abergavenny'
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: Please list the IDs of the paragraphs in which the character "son to Tamora" appears.
Evidence: character "son to Tamora"  refers to characters.Description = 'son to Tamora'
SQL: SELECT T1.id FROM paragraphs AS T1 INNER JOIN characters AS T2 ON T1.character_id = T2.id WHERE T2.Description = 'son to Tamora'
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: For how many times has the scene "OLIVIA’S house." appeared in Twelfth Night?
Evidence: "OLIVIA’S house."  refers to chapters.Description = 'OLIVIA’S house.'; Twelfth Night refers to Title = 'Twelfth Night'
SQL: SELECT COUNT(T2.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Description = 'OLIVIA’S house.' AND T1.Title = 'Twelfth Night'
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: How many characters are there in Twelfth Night?
Evidence: Twelfth Night refers to Title = 'Twelfth Night'
SQL: SELECT COUNT(DISTINCT T4.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T1.Title = 'Twelfth Night'
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: Please give the title of the work of Shakespeare that has the most characters.
Evidence: most characters refers to max(count(character_id))
SQL: SELECT T.Title FROM ( SELECT T1.Title, COUNT(T3.character_id) AS num FROM works T1 INNER JOIN chapters T2 ON T1.id = T2.work_id INNER JOIN paragraphs T3 ON T2.id = T3.chapter_id INNER JOIN characters T4 ON T3.character_id = T4.id GROUP BY T3.character_id, T1.Title ) T ORDER BY T.num DESC LIMIT 1
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: What is the average number of characters in all the works of Shakespeare?
Evidence: average number = divide(sum(character_id), count(work_id))
SQL: SELECT SUM(DISTINCT T4.id) / COUNT(T1.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: How many scenes are there on average in one act in Twelfth Night?
Evidence: Twelfth Night refers to Title = 'Twelfth Night'; average scene = divide(sum(Scene), count(Act))
SQL: SELECT SUM(T2.Scene) / COUNT(T2.Act) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Twelfth Night'
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: How many comedies did Shakespeare create?
Evidence: comedies refers to GenreType = 'Comedy'
SQL: SELECT COUNT(id) FROM works WHERE GenreType = 'Comedy'
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: When did Shakespeare write the first poem?
Evidence: first poem refers to GenreType = 'Poem' and Date = 'min'
SQL: SELECT MIN(Date) FROM works WHERE GenreType = 'Poem'
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: Give the abbreviation name for the character "Earl of Westmoreland".
Evidence: abbreviation name refers to Abbrev; character "Earl of Westmoreland" refers to CharName = 'Earl of Westmoreland'
SQL: SELECT DISTINCT Abbrev FROM characters WHERE CharName = 'Earl of Westmoreland'
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: Which chapter has the most paragraphs? Give the description of the chapter.
Evidence: most paragraphs refers to max(count(chapter_id))
SQL: SELECT T1.Description FROM chapters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.chapter_id ORDER BY T2.ParagraphNum DESC LIMIT 1
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: Which character was mentioned in the paragraph "Would he do so, I'ld beg your precious mistress, Which he counts but a trifle."? Give the character name.
Evidence: paragraph "Would he do so, I'ld beg your precious mistress, Which he counts but a trifle."  refers to PlainText = 'Would he do so, I'ld beg your precious mistress, Which he counts but a trifle.'
SQL: SELECT T1.CharName FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.PlainText = 'Would he do so, I''ld beg your precious mistress,Which he counts but a trifle.'
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: How many characters are there in Titus Andronicus?
Evidence: Titus Andronicus refers to Title = 'Titus Andronicus'
SQL: SELECT COUNT(DISTINCT T3.character_id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id WHERE T1.Title = 'Titus Andronicus'
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: List the number of acts in Two Gentlemen of Verona.
Evidence: Two Gentlemen of Verona refers to LongTitle = 'Two Gentlemen of Verona'
SQL: SELECT DISTINCT T1.Act FROM chapters AS T1 INNER JOIN works AS T2 ON T1.id = T1.work_id WHERE T2.LongTitle = 'Two Gentlemen of Verona'
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: What is the description for the character mentioned in paragraph No.640171?
Evidence: paragraph No.640171 refers to paragraphs.id = '640171'
SQL: SELECT T1.Description FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.id = '640171'
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: Give the title of the work that contains the character "Shylock".
Evidence: character "Shylock" refers to CharName = 'Shylock'
SQL: SELECT DISTINCT T1.Title FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T4.CharName = 'Shylock'
Database: shakespeare
Tables: chapters, characters, paragraphs, works
Columns (table index, column name): -1, *, 0, id, 0, Act, 0, Scene, 0, Description, 0, work_id, 1, id, 1, CharName, 1, Abbrev, 1, Description, 2, id, 2, ParagraphNum, 2, PlainText, 2, character_id, 2, chapter_id, 3, id, 3, Title, 3, LongTitle, 3, Date, 3, GenreType
Question: How many scenes are there in King John?
Evidence: King John refers to Title = 'King John'
SQL: SELECT COUNT(T2.Scene) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'King John'