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: How many chapters does the character Demetrius show in the story?
Evidence: character Demetrius refers to CharName = 'Demetrius'
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 = 'Demetrius'
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 Shakespeare story with character ID 324 has description of 'this friend of Caesar'?
SQL: SELECT 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 T2.id = '324' AND T2.Description = 'friend to Caesar'
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 description for the Act No.2, Scene No.2 of Midsummer Night's Dream.
Evidence: Act No.2 refers to Act = '2'; Scene No.2  refers to Scene = '2'; Midsummer Night's Dream refers to Title = 'Midsummer Night''s Dream'
SQL: SELECT T2.Description FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Act = '2' AND T2.Scene = '2' AND 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: Which Shakespeare tragedy has the most scenes? Give the long title.
Evidence: tragedy refers to GenreType = 'Tragedy'; most scenes refers to max(count(Scene))
SQL: SELECT T.LongTitle FROM ( SELECT T1.LongTitle, COUNT(T2.Scene) AS num FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.GenreType = 'Tragedy' GROUP BY T1.LongTitle, T2.Scene ) AS 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: How many paragraphs are there in the scene whose description is "A Sea-port in Cyprus. An open place near the quay."?
SQL: SELECT SUM(T2.ParagraphNum) FROM chapters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.chapter_id WHERE T1.Description = 'A Sea-port in Cyprus. An open place near the quay.'
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 percentage of all scenes are tragic scenes in Shakespeare's work in 1594?
Evidence: tragic scenes refers to GenreType = 'Tragedy'; work in 1594 refers to Date = '1594'; percentage = divide((sum(Scene) when GenreType = 'Tragedy'), count(Scene))as percentage
SQL: SELECT CAST(SUM(IIF(T2.GenreType = 'Tragedy', 1, 0)) AS REAL) * 100 / COUNT(T1.Scene) FROM chapters AS T1 INNER JOIN works AS T2 ON T1.work_id = T2.id WHERE T2.Date = '1594'
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: Gives the average number of chapters in Shakespeare's 1599 work.
Evidence: 1599 work refers to Date = '1599'; average number refers to divide(count(chapters.id), count(works.id))
SQL: SELECT CAST(COUNT(T1.id) AS REAL) / COUNT(DISTINCT T2.id) FROM chapters AS T1 INNER JOIN works AS T2 ON T1.work_id = T2.id WHERE T2.Date = '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: How many "servant to Timon" characters are there?
Evidence: servant to Timon refers to characters.Description = 'servant to Timon'
SQL: SELECT COUNT(id) FROM characters WHERE Description = 'servant to Timon'
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 of the first ever work of William Shakespeare?
Evidence: first ever work refers to min(Date)
SQL: SELECT Title FROM works WHERE Date = ( SELECT MIN(Date) FROM works )
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 poems did Shakespeare write?
Evidence: poems refers to GenreType = 'Poem'
SQL: SELECT COUNT(id) 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: How many scenes are there in work id 7, act 1?
SQL: SELECT COUNT(id) FROM chapters WHERE work_id = 7 AND 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: In the year 1500s, how many tragedies did Shakespeare write?
Evidence: year 1500s refers to Date between 1500 and 1599; tragedies refers to GenreType = 'Tragedy'
SQL: SELECT COUNT(id) FROM works WHERE GenreType = 'Tragedy' 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: Who is the daughter of Capulet?
Evidence: daughter of Capulet refers to characters.Description = 'Daughter to Capulet'
SQL: SELECT CharName FROM characters WHERE Description = 'Daughter to Capulet'
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 "Ay, surely, mere the truth: I know his lady."?
Evidence: "Ay, surely, mere the truth: I know his lady." refers to PlainText = 'Ay, surely, mere the truth: I know his lady.'
SQL: SELECT ParagraphNum FROM paragraphs WHERE PlainText = 'Ay, surely, mere the truth: I know his lady.'
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 long title of the work with the highest number of scenes in act 1?
Evidence: highest number of scenes refers to max(count(Scene))
SQL: SELECT T2.LongTitle FROM chapters AS T1 INNER JOIN works AS T2 ON T1.work_id = T2.id WHERE T1.Act = 1 ORDER BY T1.Scene 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 description of the chapter with the longest number of paragraphs?
Evidence: chapter with the longest number of paragraphs refers to max(ParagraphNum)
SQL: SELECT T2.Description FROM paragraphs AS T1 INNER JOIN chapters AS T2 ON T1.chapter_id = T2.id ORDER BY T1.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: In "Twelfth Night, Or What You Will", what is the description of the chapter in 2nd scene, Act 2?
Evidence: "Twelfth Night, Or What You Will"  refers to LongTitle = 'Twelfth Night, Or What You Will'; 2nd scene refers to Scene = 2
SQL: SELECT T2.Description FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.LongTitle = 'Twelfth Night, Or What You Will' AND T2.Scene = 2 AND T2.Act = 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: What are the descriptions of the short chapters?
Evidence: short chapters refers to ParagraphNum < 150
SQL: SELECT DISTINCT T2.Description FROM paragraphs AS T1 INNER JOIN chapters AS T2 ON T1.chapter_id = T2.id WHERE T1.ParagraphNum < 150
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 of Shakespeare's work has chapter description of "A field near Windsor"?
SQL: SELECT T2.Title FROM chapters AS T1 INNER JOIN works AS T2 ON T1.work_id = T2.id WHERE T1.Description = 'A field near Windsor.'
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 the chapter with the highest amount of scenes in act 1?
Evidence: How many paragraphs refers to ParagraphNum; highest amount of scenes refers to max(count(Scene))
SQL: SELECT T1.ParagraphNum FROM paragraphs AS T1 INNER JOIN chapters AS T2 ON T1.chapter_id = T2.id WHERE T2.Act = 1 ORDER BY T2.Scene 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: Other than "stage directions", what is the name of the character that appeared 5 times in "the sea-coast"?
Evidence: Other than "stage directions" refers to CharName ! = '(stage directions)'; name of the character refers to CharName; appeared 5 times in "the sea-coast" refers to chapters.Description = 'The sea-coast.' and count(character_id) = 5
SQL: SELECT T.CharName FROM ( SELECT T3.CharName, COUNT(T3.id) AS num FROM paragraphs AS T1 INNER JOIN chapters AS T2 ON T1.chapter_id = T2.id INNER JOIN characters AS T3 ON T1.character_id = T3.id WHERE T2.Description = 'The sea-coast.' AND T3.CharName != '(stage directions)' AND T1.chapter_id = 18709 GROUP BY T3.id, T3.CharName ) AS T WHERE T.num = 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: Among the chapters in "As You Like It", how many chapters have a paragraph number of no more than 50?
Evidence: "As You Like It" refers to Title = 'As You Like It' ;paragraph number of no more than 50 refers to ParagraphNum < 50
SQL: SELECT COUNT(T3.chapter_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 = 'As You Like It' AND T3.ParagraphNum < 50
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: In "Florence. Without the walls. A tucket afar off", what is the id of the character that was mentioned in "His name, I pray you."?
Evidence: "Florence. Without the walls. A tucket afar off" refers to chapters.Description = 'Florence. Without the walls. A tucket afar off.'; "His name, I pray you." refers to PlainText = 'His name, I pray you.'
SQL: SELECT T1.character_id FROM paragraphs AS T1 INNER JOIN chapters AS T2 ON T1.chapter_id = T2.id WHERE T1.PlainText = 'His name, I pray you.' AND T2.Description = 'Florence. Without the walls. A tucket afar off.'
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 Hamlet?
Evidence: Hamlet refers to Title = 'Hamlet'
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 = 'Hamlet'
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 the 5th act of "History of Henry VIII"?
Evidence: 5th act refers to Act = 5; "History of Henry VIII" refers to LongTitle = 'History of Henry VIII'
SQL: SELECT SUM(T2.Scene) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Act = 5 AND T1.LongTitle = 'History of Henry VIII'
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 history works written by Shakespeare, how many works whose 1st acts have no more than 2 scenes?
Evidence: history refers to GenreType = 'History' ; 1st acts  refers to Act = 1; no more than 2 scenes refers to count(Scene) < 2
SQL: SELECT COUNT(DISTINCT T2.work_id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Act = 1 AND T2.Scene < 2 AND T1.GenreType = 'History'
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 are there in Sonnets?
Evidence: Sonnets refers to Title = 'Sonnets'
SQL: SELECT SUM(DISTINCT T2.Act) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Sonnets'
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 the chapter where the character whose abrreviated name is 1Play appeared first?
Evidence: abbreviated name is 1Play; appeared first refers to Abbrev = '1Play' and min(chapter_id)
SQL: SELECT T2.Description FROM paragraphs AS T1 INNER JOIN chapters AS T2 ON T1.chapter_id = T2.id INNER JOIN characters AS T3 ON T1.character_id = T3.id WHERE T3.Abbrev = '1Play' ORDER BY T1.chapter_id 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 titles and genres of the one-act works of Shakespeare?
Evidence: one-act works refers to count(Act) = 1; genre refers to GenreType

SQL: SELECT DISTINCT T1.Title, T1.GenreType FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE 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: How many paragraphs are there in the longest chapter where Sir Richard Ratcliff appeared?
Evidence: longest chapter refers to max(ParagraphNum); Sir Richard Ratcliff  refers to CharName = 'Sir Richard Ratcliff'
SQL: SELECT MAX(T2.ParagraphNum) FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.CharName = 'Sir Richard Ratcliff'
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: In "A Lover's Complaint", what is the description of Act 1, Scene 1?
Evidence: "A Lover's Complaint" refers to Title = 'A Lover''s Complaint'
SQL: SELECT T2.Description FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Act = 1 AND T2.Scene = 1 AND T1.Title = 'A Lover''s Complaint'
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 create his work that has 154 scenes?
Evidence: When refers to Date; has 154 scenes refers to count(Scene) = 154
SQL: SELECT T1.Date, T1.id FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Scene = 154
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: On average, how many scenes are there in each of the comedy works written by Shakespeare?
Evidence: comedy refers to GenreType = 'Comedy'; average = divide(sum(count(Scene)), count(work.id))
SQL: SELECT CAST(SUM(T2.Scene) AS REAL) / COUNT(T1.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.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: Between Rome and Juliet, which character was mentioned the most in the The Tragedy of Romeo and Juliet? Calculate for Romeo and Juliet's individual amount of appearance in percentage against the overall number of characters that appeared in the said work.
Evidence: Rome and Juliet refers to CharName = 'Romeo' and CharName = 'Juliet'; The Tragedy of Romeo and Juliet refers to LongTitle = 'The Tragedy of Romeo and Juliet'; percentage = divide(sum(charater.id) when CharName = 'Romeo', sum(charater.id)) as percentage and percentage = divide(sum(charater.id) when CharName = 'Juliet', count(charater.id)) as percentage
SQL: SELECT SUM(IIF(T4.CharName = 'Romeo', 1, 0)), SUM(IIF(T4.CharName = 'Juliet', 1, 0)), CAST(SUM(IIF(T4.CharName = 'Romeo', 1, 0)) + SUM(IIF(T4.CharName = 'Juliet', 1, 0)) AS REAL) * 100 / 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: What is the paragraph number with plain text "This is Illyria, lady"?
Evidence: paragraph number refers to ParagraphNum
SQL: SELECT ParagraphNum FROM paragraphs WHERE PlainText = 'This is Illyria, lady.'
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 number of paragraphs are there in chapter ID 18881?
Evidence: number of paragraphs refers to ParagraphNum
SQL: SELECT COUNT(ParagraphNum) FROM paragraphs WHERE chapter_id = 18881