problem
stringlengths 121
422
| db_id
stringclasses 69
values | solution
stringlengths 23
804
|
---|---|---|
Write SQL query to solve given problem: How many of Shakespeare's works were finished before the year 1602?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT COUNT(id) FROM works WHERE Date < 1602 |
Write SQL query to solve given problem: How many scenes are there in Act 1 in Twelfth Night?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: What is the description of Act 1, Scene 2 in Twelfth Night?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: How many more scenes are there in Act 1 than in Act 5 in Twelfth Night?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: Which work is the character Lord Abergavenny from? Please give its short or abbreviated title.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: Please list the character names of all the characters from the work Twelfth Night.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: How many paragraphs are there in Act 1, Scene 1 in Twelfth Night?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: Please list all the paragraphs in Act 1, Scene 1 in Twelfth Night.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: How many paragraphs contain the character Lord Abergavenny?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT SUM(T1.ParagraphNum) FROM paragraphs AS T1 INNER JOIN characters AS T2 ON T1.character_id = T2.id WHERE T2.CharName = 'Lord Abergavenny' |
Write SQL query to solve given problem: Please list the IDs of the paragraphs in which the character "son to Tamora" appears.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT T1.id FROM paragraphs AS T1 INNER JOIN characters AS T2 ON T1.character_id = T2.id WHERE T2.Description = 'son to Tamora' |
Write SQL query to solve given problem: For how many times has the scene "OLIVIA’S house." appeared in Twelfth Night?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: How many characters are there in Twelfth Night?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: Please give the title of the work of Shakespeare that has the most characters.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: What is the average number of characters in all the works of Shakespeare?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: How many scenes are there on average in one act in Twelfth Night?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: How many comedies did Shakespeare create?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT COUNT(id) FROM works WHERE GenreType = 'Comedy' |
Write SQL query to solve given problem: When did Shakespeare write the first poem?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT MIN(Date) FROM works WHERE GenreType = 'Poem' |
Write SQL query to solve given problem: Give the abbreviation name for the character "Earl of Westmoreland".. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT DISTINCT Abbrev FROM characters WHERE CharName = 'Earl of Westmoreland' |
Write SQL query to solve given problem: Which chapter has the most paragraphs? Give the description of the chapter.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: 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.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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.' |
Write SQL query to solve given problem: How many characters are there in Titus Andronicus?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: List the number of acts in Two Gentlemen of Verona.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: What is the description for the character mentioned in paragraph No.640171?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT T1.Description FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.id = '640171' |
Write SQL query to solve given problem: Give the title of the work that contains the character "Shylock".. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: How many scenes are there in King John?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT COUNT(T2.Scene) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'King John' |
Write SQL query to solve given problem: How many chapters does the character Demetrius show in the story?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: Which Shakespeare story with character ID 324 has description of 'this friend of Caesar'?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: Give the description for the Act No.2, Scene No.2 of Midsummer Night's Dream.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: Which Shakespeare tragedy has the most scenes? Give the long title.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: How many paragraphs are there in the scene whose description is "A Sea-port in Cyprus. An open place near the quay."?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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.' |
Write SQL query to solve given problem: What percentage of all scenes are tragic scenes in Shakespeare's work in 1594?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: Gives the average number of chapters in Shakespeare's 1599 work.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: How many "servant to Timon" characters are there?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT COUNT(id) FROM characters WHERE Description = 'servant to Timon' |
Write SQL query to solve given problem: What is the title of the first ever work of William Shakespeare?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT Title FROM works WHERE Date = ( SELECT MIN(Date) FROM works ) |
Write SQL query to solve given problem: How many poems did Shakespeare write?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT COUNT(id) FROM works WHERE GenreType = 'Poem' |
Write SQL query to solve given problem: How many scenes are there in work id 7, act 1?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT COUNT(id) FROM chapters WHERE work_id = 7 AND Act = 1 |
Write SQL query to solve given problem: In the year 1500s, how many tragedies did Shakespeare write?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT COUNT(id) FROM works WHERE GenreType = 'Tragedy' AND Date BETWEEN 1500 AND 1599 |
Write SQL query to solve given problem: Who is the daughter of Capulet?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT CharName FROM characters WHERE Description = 'Daughter to Capulet' |
Write SQL query to solve given problem: How many paragraphs are there in "Ay, surely, mere the truth: I know his lady."?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT ParagraphNum FROM paragraphs WHERE PlainText = 'Ay, surely, mere the truth: I know his lady.' |
Write SQL query to solve given problem: What is the long title of the work with the highest number of scenes in act 1?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: What is the description of the chapter with the longest number of paragraphs?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: In "Twelfth Night, Or What You Will", what is the description of the chapter in 2nd scene, Act 2?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: What are the descriptions of the short chapters?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT DISTINCT T2.Description FROM paragraphs AS T1 INNER JOIN chapters AS T2 ON T1.chapter_id = T2.id WHERE T1.ParagraphNum < 150 |
Write SQL query to solve given problem: Which of Shakespeare's work has chapter description of "A field near Windsor"?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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.' |
Write SQL query to solve given problem: How many paragraphs are there in the chapter with the highest amount of scenes in act 1?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: Other than "stage directions", what is the name of the character that appeared 5 times in "the sea-coast"?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: Among the chapters in "As You Like It", how many chapters have a paragraph number of no more than 50?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: 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."?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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.' |
Write SQL query to solve given problem: How many characters are there in Hamlet?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: How many scenes are there in the 5th act of "History of Henry VIII"?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: Among the history works written by Shakespeare, how many works whose 1st acts have no more than 2 scenes?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: How many acts are there in Sonnets?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT SUM(DISTINCT T2.Act) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Sonnets' |
Write SQL query to solve given problem: What is the description of the chapter where the character whose abrreviated name is 1Play appeared first?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: What are the titles and genres of the one-act works of Shakespeare?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: How many paragraphs are there in the longest chapter where Sir Richard Ratcliff appeared?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: In "A Lover's Complaint", what is the description of Act 1, Scene 1?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: When did Shakespeare create his work that has 154 scenes?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT T1.Date, T1.id FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Scene = 154 |
Write SQL query to solve given problem: On average, how many scenes are there in each of the comedy works written by Shakespeare?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: 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.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: What is the paragraph number with plain text "This is Illyria, lady"?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT ParagraphNum FROM paragraphs WHERE PlainText = 'This is Illyria, lady.' |
Write SQL query to solve given problem: How many number of paragraphs are there in chapter ID 18881?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT COUNT(ParagraphNum) FROM paragraphs WHERE chapter_id = 18881 |
Write SQL query to solve given problem: List down any 5 titles in the history genre.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT Title FROM works WHERE GenreType = 'History' LIMIT 5 |
Write SQL query to solve given problem: How many scenes are there in Act 5 of work ID 9?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT COUNT(Scene) FROM chapters WHERE work_id = 9 AND Act = 5 |
Write SQL query to solve given problem: List the character names and descriptions of chapter ID 18710.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: How many chapters are there in "Midsummer Night's Dream"?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: How many paragraphs are there in Act 5 Scene 1 of "Comedy of Errors"?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: What are the character names and descriptions of characters in "Venus and Adonis"?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: What is the title which has character named "Froth"?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: How many chapters include the character name "First Witch"?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: List the scenes and descriptions in Act 1 of " Pericles, Prince of Tyre".. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: Describe the full title which had the character named Servant to Montague.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: Describe the scene number, act, and title of work which had the description of "The house of ANTIPHOLUS of Ephesus" in chapter.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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.' |
Write SQL query to solve given problem: Provide the character name, paragraph number, and plain text of "cousin to the king" description.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: Calculate average scene per act in Antony and Cleopatra.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: Calculate the percentage of paragraphs in all chapters of "All's Well That Ends Well".. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: How many "all" character names have the "all" abbreviation?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT COUNT(id) FROM characters WHERE Abbrev = 'All' |
Write SQL query to solve given problem: Please name any three comedic works.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT Title FROM works WHERE GenreType = 'comedy' LIMIT 3 |
Write SQL query to solve given problem: From 1593 onwards, what is the difference between the number of comedy works and history works?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT SUM(IIF(GenreType = 'Comedy', 1, 0)) - SUM(IIF(GenreType = 'History', 1, 0)) FROM works WHERE Date > 1593 |
Write SQL query to solve given problem: Please name the latest historical work.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT LongTitle FROM works WHERE GenreType = 'History' ORDER BY Date DESC LIMIT 1 |
Write SQL query to solve given problem: What are the work numbers that are related to King Henry?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT id FROM works WHERE Title LIKE '%Henry%' |
Write SQL query to solve given problem: What are the character names for a senator of Venice?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT CharName FROM characters WHERE Description = 'a senator of Venice' |
Write SQL query to solve given problem: What is the name of the character that can be found in paragraph 8 of chapter 18820?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: What is the description of chapter 18704, where there is a character called Orsino?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: How many scenes can be found in "Twelfth Night, Or What You Will"?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: Please list all of the character descriptions in paragraph 20.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT T1.Description FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.ParagraphNum = 20 |
Write SQL query to solve given problem: How many chapters have the name Gratiano as a character for "friend to Antonio and Bassiano"?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: What is the description of chapter 18706 in "All's Well That Ends Well"?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: What are the character names in paragraph 3?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT DISTINCT T1.CharName FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.ParagraphNum = 3 |
Write SQL query to solve given problem: Please list all of the paragraphs that have the character name Aedile.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT T2.ParagraphNum FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.CharName = 'Aedile' |
Write SQL query to solve given problem: Please list any two character names in chapter 18708.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: How many acts can be found in the comedy "Two Gentlemen of Verona"?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: What is the percentage of historical works that have not fewer than five scenes in the 1500s?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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 |
Write SQL query to solve given problem: What is the percentage of act number 5 in Titus Andronicus?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: How many of the works of Shakespeare are Tragedy?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT COUNT(id) FROM works WHERE GenreType = 'Tragedy' |
Write SQL query to solve given problem: Among the works of Shakespeare, how many of them have the word "Henry" on its title?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT COUNT(id) FROM works WHERE Title LIKE '%Henry%' |
Write SQL query to solve given problem: Give the character's ID of the character that said the paragraph "O my poor brother! and so perchance may he be.". Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT character_id FROM paragraphs WHERE PlainText = 'O my poor brother! and so perchance may he be.' |
Write SQL query to solve given problem: List the paragraph number and paragraphs said by the character named "Sir Andrew Aguecheek".. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | 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' |
Write SQL query to solve given problem: Give the title and the characters name of the most recent work of Shakespeare.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT T1.Title, 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 ORDER BY T1.Date DESC LIMIT 1 |
Write SQL query to solve given problem: Among paragraphs with paragraph number between 1900 to 1950, list the texts said by a character described as a sea captain, friend to Sebatian.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT T1.description FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.PlainText = 'a sea captain, friend to Sebastian' AND T2.ParagraphNum BETWEEN 1500 AND 1950 |
Write SQL query to solve given problem: What is the long title of the Shakespeare's work with Act 4 Scene 5 described as "Mytilene. A street before the brothel."?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | shakespeare | SELECT T1.LongTitle FROM works AS T1 RIGHT JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Description = 'Mytilene. A street before the brothel.' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.