1sf/bird-sql-train-with-schema huggingface dataset:
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 down any 5 titles in the history genre.
Evidence: in the history genre refers to GenreType = 'History'
SQL: SELECT Title FROM works WHERE GenreType = 'History' LIMIT 5
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 5 of work ID 9?
SQL: SELECT COUNT(Scene) FROM chapters WHERE work_id = 9 AND Act = 5
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 character names and descriptions of chapter ID 18710.
Evidence: character names refers to CharName
SQL: SELECT DISTINCT T1.CharName, T1.Description FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.Chapter_id = 18710
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 chapters are there in "Midsummer Night's Dream"?
Evidence: in "Midsummer Night's Dream" refers to Title = 'Midsummer Night's Dream'
SQL: SELECT COUNT(T2.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Midsummer Night''s Dream'
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 5 Scene 1 of "Comedy of Errors"?
Evidence: "Comedy of Errors" refers to Title = 'Comedy of Errors'
SQL: SELECT COUNT(T3.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 T2.Act = 5 AND T2.Scene = 1 AND T1.Title = 'Comedy of Errors'
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 are the character names and descriptions of characters in "Venus and Adonis"?
Evidence: character names refers to CharName; "Venus and Adonis" refers to Title = 'Venus and Adonis'
SQL: SELECT DISTINCT T4.CharName, T2.Description 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 = 'Venus and Adonis'
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 title which has character named "Froth"?
Evidence: character named "Froth" refers to CharName = 'Froth'
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 = 'Froth'
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 chapters include the character name "First Witch"?
Evidence: character name "First Witch" refers to CharName = 'First Witch'
SQL: SELECT COUNT(T2.chapter_id) FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.CharName = 'First Witch'
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 scenes and descriptions in Act 1 of " Pericles, Prince of Tyre".
Evidence: " Pericles, Prince of Tyre" refers to LongTitle = 'Pericles, Prince of Tyre'
SQL: SELECT T2.Scene, T2.Description FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.LongTitle = 'Pericles, Prince of Tyre' AND T2.Act = 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: Describe the full title which had the character named Servant to Montague.
Evidence: full title refers to LongTitle; character named Servant to Montague refers to characters.Description = 'Servant to Montague'
SQL: SELECT DISTINCT T1.LongTitle 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.Description = 'Servant to Montague'
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: Describe the scene number, act, and title of work which had the description of "The house of ANTIPHOLUS of Ephesus" in chapter.
SQL: SELECT T2.Act, T2.Scene, T1.Title FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Description = 'The house of ANTIPHOLUS of Ephesus.'
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: Provide the character name, paragraph number, and plain text of "cousin to the king" description.
Evidence: character name refers to CharName; paragraph number refers to ParagraphNum
SQL: SELECT T1.CharName, T2.ParagraphNum, T2.PlainText FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.Description = 'cousin to the king'
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: Calculate average scene per act in Antony and Cleopatra.
Evidence: Antony and Cleopatra refers to Title = 'Antony and Cleopatra'; average scene per act = divide(sum(Scene), count(act))

SQL: SELECT CAST(SUM(T2.Scene) AS REAL) / COUNT(T2.act) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Antony and Cleopatra'
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: Calculate the percentage of paragraphs in all chapters of "All's Well That Ends Well".
Evidence: "All's Well That Ends Well" refers to Title = 'All's Well That Ends Well'; percentage = divide(sum(paragraphs.id) when Title = 'All's Well That Ends Well', count(paragraphs.id)) as percentage
SQL: SELECT CAST(SUM(IIF(T1.Title = 'All''s Well That Ends Well', 1, 0)) AS REAL) * 100 / COUNT(T3.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
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 "all" character names have the "all" abbreviation?
Evidence: character names refers to CharName；"all" abbreviation refers to Abbrev = 'all'
SQL: SELECT COUNT(id) FROM characters WHERE Abbrev = 'All'
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 name any three comedic works.
Evidence: comedic works refers to GenreType = 'comedy'
SQL: SELECT Title FROM works WHERE GenreType = 'comedy' LIMIT 3
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: From 1593 onwards, what is the difference between the number of comedy works and history works?
Evidence: From 1593 onwards refers to Date > 1593; comedy works and history works refers to GenreType = 'comedy' and GenreType = 'History'
SQL: SELECT SUM(IIF(GenreType = 'Comedy', 1, 0)) - SUM(IIF(GenreType = 'History', 1, 0)) FROM works WHERE Date > 1593
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 name the latest historical work.
Evidence: name refers to LongTitle; latest historical work refers to GenreType = 'History' and max(Date)
SQL: SELECT LongTitle FROM works WHERE GenreType = 'History' ORDER BY Date 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 are the work numbers that are related to King Henry?
Evidence: work numbers refers to works.id; related to King Henry refers to Title = '%Henry%'
SQL: SELECT id FROM works WHERE Title LIKE '%Henry%'
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 are the character names for a senator of Venice?
Evidence: character names refers to CharName; a senator of Venice refers to characters.Description = 'a senator of Venice'
SQL: SELECT CharName FROM characters WHERE Description = 'a senator of Venice'
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 name of the character that can be found in paragraph 8 of chapter 18820?
Evidence: name of the character refers to CharName; paragraph 8 refers to ParagraphNum = 8; chapter 18820 refers to chapter_id = 18820
SQL: SELECT T1.CharName FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.ParagraphNum = 8 AND T2.chapter_id = 18820
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 chapter 18704, where there is a character called Orsino?
Evidence: chapter 18704 refers to chapters.id = 18704; character called Orsino refers to CharName = 'Orsino'
SQL: SELECT DISTINCT T3.Description FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id INNER JOIN chapters AS T3 ON T2.chapter_id = T3.id WHERE T1.CharName = 'Orsino' AND T3.ID = 18704
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 can be found in "Twelfth Night, Or What You Will"?
Evidence: "Twelfth Night, Or What You Will" refers to LongTitle
SQL: SELECT COUNT(T2.Scene) AS cnt FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.LongTitle = 'Cymbeline, King of Britain'
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 of the character descriptions in paragraph 20.
Evidence: paragraph 20 refers to ParagraphNum = 20
SQL: SELECT T1.Description FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.ParagraphNum = 20
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 chapters have the name Gratiano as a character for "friend to Antonio and Bassiano"?
Evidence: name Gratiano as a character refers to CharName = 'Gratiano'; "friend to Antonio and Bassiano" refers to characters.Description = 'friend to Antonio and Bassiano'
SQL: SELECT COUNT(DISTINCT T2.chapter_id) FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.CharName = 'Gratiano' AND T1.Description = 'friend to Antonio and Bassiano'
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 chapter 18706 in "All's Well That Ends Well"?
Evidence: chapter 18706 refers to chapters.id; "All's Well That Ends Well" refers to Title = 'All's Well That Ends Well'
SQL: SELECT T2.Description FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.id = 18706 AND T1.Title = 'All''s Well That Ends Well'
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 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: 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 of the paragraphs that have the character name Aedile.
Evidence: paragraphs  refers to ParagraphNum; character name Aedile refers to CharName = 'Aedile'
SQL: SELECT T2.ParagraphNum FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.CharName = 'Aedile'
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 any two character names in chapter 18708.
Evidence: character names refers to CharName; chapter 18708 refers to chapter_id = 18708
SQL: SELECT T1.CharName FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.chapter_id = 18708 LIMIT 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 acts can be found in the comedy "Two Gentlemen of Verona"?
Evidence: comedy refers to GenreType = 'comedy'; "Two Gentlemen of Verona" refers to Title = 'Two Gentlemen of Verona'
SQL: SELECT COUNT(T1.ACT) FROM chapters AS T1 LEFT JOIN works AS T2 ON T1.work_id = T2.id WHERE T2.GenreType = 'Comedy' AND T2.Title = '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 percentage of historical works that have not fewer than five scenes in the 1500s?
Evidence: historical works refers to GenreType = 'history'; have not fewer than five scenes in the 1500s refers to count(Scene) > = 5 and DATE > = 1500 AND DATE < = 1599; percentage = divide(count(works.id) where GenreType = 'history' and count(Scene) > = 5, count(works.id) ) as percentage
SQL: SELECT CAST(( SELECT COUNT(T1.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.GenreType = 'History' AND T1.DATE BETWEEN 1500 AND 1599 GROUP BY T1.id HAVING COUNT(T2.Scene) >= 5 ) AS REAL) * 100 / COUNT(id) FROM works WHERE GenreType = 'History' AND DATE BETWEEN 1500 AND 1599
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 percentage of act number 5 in Titus Andronicus?
Evidence: act number 5 refers to Act = 5; Titus Andronicus refers to Title = 'Titus Andronicus'; percentage = divide(sum(Act = 5), count(Act)) as percentage
SQL: SELECT CAST(SUM(IIF(T2.act = 5, 1, 0)) AS REAL) * 100 / COUNT(T2.act) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_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: How many of the works of Shakespeare are Tragedy?
Evidence: Tragedy refers to GenreType = 'Tragedy'
SQL: SELECT COUNT(id) FROM works WHERE GenreType = 'Tragedy'
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: Among the works of Shakespeare, how many of them have the word "Henry" on its title?
Evidence: works refers to Title; have the word "Henry" on its title refers to Title = '%Henry%'
SQL: SELECT COUNT(id) FROM works WHERE Title LIKE '%Henry%'
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 character's ID of the character that said the paragraph "O my poor brother! and so perchance may he be."
Evidence: "O my poor brother! and so perchance may he be." refers to  PlainText = 'O my poor brother! and so perchance may he be.'
SQL: SELECT character_id FROM paragraphs WHERE PlainText = 'O my poor brother! and so perchance may he be.'
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 paragraph number and paragraphs said by the character named "Sir Andrew Aguecheek".
Evidence: paragraph number refers to ParagraphNum; character named "Sir Andrew Aguecheek" refers to CharName = 'Sir Andrew Aguecheek'
SQL: SELECT T2.ParagraphNum, T2.id FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.CharName = 'Sir Andrew Aguecheek'