QIAN-ME/bird_schema_data huggingface dataset:
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 shakespeare
【Schema】
# Table: works
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Title:TEXT, Examples: [Twelfth Night]),
(LongTitle:TEXT, Examples: [Twelfth Night, Or What You Will]),
(Date:INTEGER, Examples: [1599, 1602, 1606]),
(GenreType:TEXT, Examples: [Comedy, Tragedy, History])
]
# Table: characters
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(CharName:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Abbrev:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Description:TEXT, Examples: [A senator of Venice])
]
# Table: paragraphs
[
(id:INTEGER, Primary Key, Examples: [630863, 630864, 630865]),
(ParagraphNum:INTEGER, Examples: [3, 4, 19]),
(PlainText:TEXT),
(character_id:INTEGER, Examples: [1261, 840, 297]),
(chapter_id:INTEGER, Examples: [18704, 18705, 18706])
]
# Table: chapters
[
(id:INTEGER, Primary Key, Examples: [18704, 18705, 18706]),
(Act:INTEGER, Examples: [1, 2, 3]),
(Scene:INTEGER, Examples: [1, 2, 3]),
(Description:TEXT, Examples: [DUKE ORSINO’s palace.]),
(work_id:INTEGER, Examples: [1, 2, 3])
]
【Foreign keys】
paragraphs.chapter_id=chapters.id
paragraphs.character_id=characters.id
chapters.work_id=works.id

    【Question】
    What is the description of Act 1, Scene 2 in Twelfth Night? Twelfth Night refers to Title = 'Twelfth Night'

    【Evidence】
    Twelfth Night refers to Title = 'Twelfth Night'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 shakespeare
【Schema】
# Table: works
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Title:TEXT, Examples: [Twelfth Night]),
(LongTitle:TEXT, Examples: [Twelfth Night, Or What You Will]),
(Date:INTEGER, Examples: [1599, 1602, 1606]),
(GenreType:TEXT, Examples: [Comedy, Tragedy, History])
]
# Table: characters
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(CharName:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Abbrev:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Description:TEXT, Examples: [A senator of Venice])
]
# Table: paragraphs
[
(id:INTEGER, Primary Key, Examples: [630863, 630864, 630865]),
(ParagraphNum:INTEGER, Examples: [3, 4, 19]),
(PlainText:TEXT),
(character_id:INTEGER, Examples: [1261, 840, 297]),
(chapter_id:INTEGER, Examples: [18704, 18705, 18706])
]
# Table: chapters
[
(id:INTEGER, Primary Key, Examples: [18704, 18705, 18706]),
(Act:INTEGER, Examples: [1, 2, 3]),
(Scene:INTEGER, Examples: [1, 2, 3]),
(Description:TEXT, Examples: [DUKE ORSINO’s palace.]),
(work_id:INTEGER, Examples: [1, 2, 3])
]
【Foreign keys】
paragraphs.chapter_id=chapters.id
paragraphs.character_id=characters.id
chapters.work_id=works.id

    【Question】
    How many more scenes are there in Act 1 than in Act 5 in Twelfth Night? in Twelfth Night refers to Title = 'Twelfth Night'; How many more scenes = subtract(sum(Act = 1), sum(Act = 5))

    【Evidence】
    in Twelfth Night refers to Title = 'Twelfth Night'; How many more scenes = subtract(sum(Act = 1), sum(Act = 5))

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 shakespeare
【Schema】
# Table: works
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Title:TEXT, Examples: [Twelfth Night]),
(LongTitle:TEXT, Examples: [Twelfth Night, Or What You Will]),
(Date:INTEGER, Examples: [1599, 1602, 1606]),
(GenreType:TEXT, Examples: [Comedy, Tragedy, History])
]
# Table: characters
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(CharName:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Abbrev:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Description:TEXT, Examples: [A senator of Venice])
]
# Table: paragraphs
[
(id:INTEGER, Primary Key, Examples: [630863, 630864, 630865]),
(ParagraphNum:INTEGER, Examples: [3, 4, 19]),
(PlainText:TEXT),
(character_id:INTEGER, Examples: [1261, 840, 297]),
(chapter_id:INTEGER, Examples: [18704, 18705, 18706])
]
# Table: chapters
[
(id:INTEGER, Primary Key, Examples: [18704, 18705, 18706]),
(Act:INTEGER, Examples: [1, 2, 3]),
(Scene:INTEGER, Examples: [1, 2, 3]),
(Description:TEXT, Examples: [DUKE ORSINO’s palace.]),
(work_id:INTEGER, Examples: [1, 2, 3])
]
【Foreign keys】
paragraphs.chapter_id=chapters.id
paragraphs.character_id=characters.id
chapters.work_id=works.id

    【Question】
    Which work is the character Lord Abergavenny from? Please give its short or abbreviated title. Lord Abergavenny refers to CharName = 'Lord Abergavenny'; short or abbreviated title refers to Title

    【Evidence】
    Lord Abergavenny refers to CharName = 'Lord Abergavenny'; short or abbreviated title refers to Title

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 shakespeare
【Schema】
# Table: works
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Title:TEXT, Examples: [Twelfth Night]),
(LongTitle:TEXT, Examples: [Twelfth Night, Or What You Will]),
(Date:INTEGER, Examples: [1599, 1602, 1606]),
(GenreType:TEXT, Examples: [Comedy, Tragedy, History])
]
# Table: characters
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(CharName:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Abbrev:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Description:TEXT, Examples: [A senator of Venice])
]
# Table: paragraphs
[
(id:INTEGER, Primary Key, Examples: [630863, 630864, 630865]),
(ParagraphNum:INTEGER, Examples: [3, 4, 19]),
(PlainText:TEXT),
(character_id:INTEGER, Examples: [1261, 840, 297]),
(chapter_id:INTEGER, Examples: [18704, 18705, 18706])
]
# Table: chapters
[
(id:INTEGER, Primary Key, Examples: [18704, 18705, 18706]),
(Act:INTEGER, Examples: [1, 2, 3]),
(Scene:INTEGER, Examples: [1, 2, 3]),
(Description:TEXT, Examples: [DUKE ORSINO’s palace.]),
(work_id:INTEGER, Examples: [1, 2, 3])
]
【Foreign keys】
paragraphs.chapter_id=chapters.id
paragraphs.character_id=characters.id
chapters.work_id=works.id

    【Question】
    Please list the character names of all the characters from the work Twelfth Night. character names refers to CharName; Twelfth Night refers to Title = 'Twelfth Night'

    【Evidence】
    character names refers to CharName; Twelfth Night refers to Title = 'Twelfth Night'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 shakespeare
【Schema】
# Table: works
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Title:TEXT, Examples: [Twelfth Night]),
(LongTitle:TEXT, Examples: [Twelfth Night, Or What You Will]),
(Date:INTEGER, Examples: [1599, 1602, 1606]),
(GenreType:TEXT, Examples: [Comedy, Tragedy, History])
]
# Table: characters
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(CharName:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Abbrev:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Description:TEXT, Examples: [A senator of Venice])
]
# Table: paragraphs
[
(id:INTEGER, Primary Key, Examples: [630863, 630864, 630865]),
(ParagraphNum:INTEGER, Examples: [3, 4, 19]),
(PlainText:TEXT),
(character_id:INTEGER, Examples: [1261, 840, 297]),
(chapter_id:INTEGER, Examples: [18704, 18705, 18706])
]
# Table: chapters
[
(id:INTEGER, Primary Key, Examples: [18704, 18705, 18706]),
(Act:INTEGER, Examples: [1, 2, 3]),
(Scene:INTEGER, Examples: [1, 2, 3]),
(Description:TEXT, Examples: [DUKE ORSINO’s palace.]),
(work_id:INTEGER, Examples: [1, 2, 3])
]
【Foreign keys】
paragraphs.chapter_id=chapters.id
paragraphs.character_id=characters.id
chapters.work_id=works.id

    【Question】
    How many paragraphs are there in Act 1, Scene 1 in Twelfth Night? Twelfth Night refers to Title = 'Twelfth Night'

    【Evidence】
    Twelfth Night refers to Title = 'Twelfth Night'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 shakespeare
【Schema】
# Table: works
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Title:TEXT, Examples: [Twelfth Night]),
(LongTitle:TEXT, Examples: [Twelfth Night, Or What You Will]),
(Date:INTEGER, Examples: [1599, 1602, 1606]),
(GenreType:TEXT, Examples: [Comedy, Tragedy, History])
]
# Table: characters
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(CharName:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Abbrev:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Description:TEXT, Examples: [A senator of Venice])
]
# Table: paragraphs
[
(id:INTEGER, Primary Key, Examples: [630863, 630864, 630865]),
(ParagraphNum:INTEGER, Examples: [3, 4, 19]),
(PlainText:TEXT),
(character_id:INTEGER, Examples: [1261, 840, 297]),
(chapter_id:INTEGER, Examples: [18704, 18705, 18706])
]
# Table: chapters
[
(id:INTEGER, Primary Key, Examples: [18704, 18705, 18706]),
(Act:INTEGER, Examples: [1, 2, 3]),
(Scene:INTEGER, Examples: [1, 2, 3]),
(Description:TEXT, Examples: [DUKE ORSINO’s palace.]),
(work_id:INTEGER, Examples: [1, 2, 3])
]
【Foreign keys】
paragraphs.chapter_id=chapters.id
paragraphs.character_id=characters.id
chapters.work_id=works.id

    【Question】
    Please list all the paragraphs in Act 1, Scene 1 in Twelfth Night. Twelfth Night refers to Title = 'Twelfth Night'; list the paragraphs refers to PlainText

    【Evidence】
    Twelfth Night refers to Title = 'Twelfth Night'; list the paragraphs refers to PlainText

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 shakespeare
【Schema】
# Table: works
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Title:TEXT, Examples: [Twelfth Night]),
(LongTitle:TEXT, Examples: [Twelfth Night, Or What You Will]),
(Date:INTEGER, Examples: [1599, 1602, 1606]),
(GenreType:TEXT, Examples: [Comedy, Tragedy, History])
]
# Table: characters
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(CharName:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Abbrev:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Description:TEXT, Examples: [A senator of Venice])
]
# Table: paragraphs
[
(id:INTEGER, Primary Key, Examples: [630863, 630864, 630865]),
(ParagraphNum:INTEGER, Examples: [3, 4, 19]),
(PlainText:TEXT),
(character_id:INTEGER, Examples: [1261, 840, 297]),
(chapter_id:INTEGER, Examples: [18704, 18705, 18706])
]
# Table: chapters
[
(id:INTEGER, Primary Key, Examples: [18704, 18705, 18706]),
(Act:INTEGER, Examples: [1, 2, 3]),
(Scene:INTEGER, Examples: [1, 2, 3]),
(Description:TEXT, Examples: [DUKE ORSINO’s palace.]),
(work_id:INTEGER, Examples: [1, 2, 3])
]
【Foreign keys】
paragraphs.chapter_id=chapters.id
paragraphs.character_id=characters.id
chapters.work_id=works.id

    【Question】
    How many paragraphs contain the character Lord Abergavenny? Lord Abergavenny refers to CharName = 'Lord Abergavenny'

    【Evidence】
    Lord Abergavenny refers to CharName = 'Lord Abergavenny'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 shakespeare
【Schema】
# Table: works
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Title:TEXT, Examples: [Twelfth Night]),
(LongTitle:TEXT, Examples: [Twelfth Night, Or What You Will]),
(Date:INTEGER, Examples: [1599, 1602, 1606]),
(GenreType:TEXT, Examples: [Comedy, Tragedy, History])
]
# Table: characters
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(CharName:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Abbrev:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Description:TEXT, Examples: [A senator of Venice])
]
# Table: paragraphs
[
(id:INTEGER, Primary Key, Examples: [630863, 630864, 630865]),
(ParagraphNum:INTEGER, Examples: [3, 4, 19]),
(PlainText:TEXT),
(character_id:INTEGER, Examples: [1261, 840, 297]),
(chapter_id:INTEGER, Examples: [18704, 18705, 18706])
]
# Table: chapters
[
(id:INTEGER, Primary Key, Examples: [18704, 18705, 18706]),
(Act:INTEGER, Examples: [1, 2, 3]),
(Scene:INTEGER, Examples: [1, 2, 3]),
(Description:TEXT, Examples: [DUKE ORSINO’s palace.]),
(work_id:INTEGER, Examples: [1, 2, 3])
]
【Foreign keys】
paragraphs.chapter_id=chapters.id
paragraphs.character_id=characters.id
chapters.work_id=works.id

    【Question】
    Please list the IDs of the paragraphs in which the character "son to Tamora" appears. character "son to Tamora"  refers to characters.Description = 'son to Tamora'

    【Evidence】
    character "son to Tamora"  refers to characters.Description = 'son to Tamora'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 shakespeare
【Schema】
# Table: works
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Title:TEXT, Examples: [Twelfth Night]),
(LongTitle:TEXT, Examples: [Twelfth Night, Or What You Will]),
(Date:INTEGER, Examples: [1599, 1602, 1606]),
(GenreType:TEXT, Examples: [Comedy, Tragedy, History])
]
# Table: characters
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(CharName:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Abbrev:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Description:TEXT, Examples: [A senator of Venice])
]
# Table: paragraphs
[
(id:INTEGER, Primary Key, Examples: [630863, 630864, 630865]),
(ParagraphNum:INTEGER, Examples: [3, 4, 19]),
(PlainText:TEXT),
(character_id:INTEGER, Examples: [1261, 840, 297]),
(chapter_id:INTEGER, Examples: [18704, 18705, 18706])
]
# Table: chapters
[
(id:INTEGER, Primary Key, Examples: [18704, 18705, 18706]),
(Act:INTEGER, Examples: [1, 2, 3]),
(Scene:INTEGER, Examples: [1, 2, 3]),
(Description:TEXT, Examples: [DUKE ORSINO’s palace.]),
(work_id:INTEGER, Examples: [1, 2, 3])
]
【Foreign keys】
paragraphs.chapter_id=chapters.id
paragraphs.character_id=characters.id
chapters.work_id=works.id

    【Question】
    For how many times has the scene "OLIVIA’S house." appeared in Twelfth Night? "OLIVIA’S house."  refers to chapters.Description = 'OLIVIA’S house.'; Twelfth Night refers to Title = 'Twelfth Night'

    【Evidence】
    "OLIVIA’S house."  refers to chapters.Description = 'OLIVIA’S house.'; Twelfth Night refers to Title = 'Twelfth Night'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 shakespeare
【Schema】
# Table: works
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Title:TEXT, Examples: [Twelfth Night]),
(LongTitle:TEXT, Examples: [Twelfth Night, Or What You Will]),
(Date:INTEGER, Examples: [1599, 1602, 1606]),
(GenreType:TEXT, Examples: [Comedy, Tragedy, History])
]
# Table: characters
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(CharName:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Abbrev:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Description:TEXT, Examples: [A senator of Venice])
]
# Table: paragraphs
[
(id:INTEGER, Primary Key, Examples: [630863, 630864, 630865]),
(ParagraphNum:INTEGER, Examples: [3, 4, 19]),
(PlainText:TEXT),
(character_id:INTEGER, Examples: [1261, 840, 297]),
(chapter_id:INTEGER, Examples: [18704, 18705, 18706])
]
# Table: chapters
[
(id:INTEGER, Primary Key, Examples: [18704, 18705, 18706]),
(Act:INTEGER, Examples: [1, 2, 3]),
(Scene:INTEGER, Examples: [1, 2, 3]),
(Description:TEXT, Examples: [DUKE ORSINO’s palace.]),
(work_id:INTEGER, Examples: [1, 2, 3])
]
【Foreign keys】
paragraphs.chapter_id=chapters.id
paragraphs.character_id=characters.id
chapters.work_id=works.id

    【Question】
    How many characters are there in Twelfth Night? Twelfth Night refers to Title = 'Twelfth Night'

    【Evidence】
    Twelfth Night refers to Title = 'Twelfth Night'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 shakespeare
【Schema】
# Table: works
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Title:TEXT, Examples: [Twelfth Night]),
(LongTitle:TEXT, Examples: [Twelfth Night, Or What You Will]),
(Date:INTEGER, Examples: [1599, 1602, 1606]),
(GenreType:TEXT, Examples: [Comedy, Tragedy, History])
]
# Table: characters
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(CharName:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Abbrev:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Description:TEXT, Examples: [A senator of Venice])
]
# Table: paragraphs
[
(id:INTEGER, Primary Key, Examples: [630863, 630864, 630865]),
(ParagraphNum:INTEGER, Examples: [3, 4, 19]),
(PlainText:TEXT),
(character_id:INTEGER, Examples: [1261, 840, 297]),
(chapter_id:INTEGER, Examples: [18704, 18705, 18706])
]
# Table: chapters
[
(id:INTEGER, Primary Key, Examples: [18704, 18705, 18706]),
(Act:INTEGER, Examples: [1, 2, 3]),
(Scene:INTEGER, Examples: [1, 2, 3]),
(Description:TEXT, Examples: [DUKE ORSINO’s palace.]),
(work_id:INTEGER, Examples: [1, 2, 3])
]
【Foreign keys】
paragraphs.chapter_id=chapters.id
paragraphs.character_id=characters.id
chapters.work_id=works.id

    【Question】
    Please give the title of the work of Shakespeare that has the most characters. most characters refers to max(count(character_id))

    【Evidence】
    most characters refers to max(count(character_id))

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 shakespeare
【Schema】
# Table: works
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Title:TEXT, Examples: [Twelfth Night]),
(LongTitle:TEXT, Examples: [Twelfth Night, Or What You Will]),
(Date:INTEGER, Examples: [1599, 1602, 1606]),
(GenreType:TEXT, Examples: [Comedy, Tragedy, History])
]
# Table: characters
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(CharName:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Abbrev:TEXT, Examples: [First Apparition, First Citizen, First Conspirator]),
(Description:TEXT, Examples: [A senator of Venice])
]
# Table: paragraphs
[
(id:INTEGER, Primary Key, Examples: [630863, 630864, 630865]),
(ParagraphNum:INTEGER, Examples: [3, 4, 19]),
(PlainText:TEXT),
(character_id:INTEGER, Examples: [1261, 840, 297]),
(chapter_id:INTEGER, Examples: [18704, 18705, 18706])
]
# Table: chapters
[
(id:INTEGER, Primary Key, Examples: [18704, 18705, 18706]),
(Act:INTEGER, Examples: [1, 2, 3]),
(Scene:INTEGER, Examples: [1, 2, 3]),
(Description:TEXT, Examples: [DUKE ORSINO’s palace.]),
(work_id:INTEGER, Examples: [1, 2, 3])
]
【Foreign keys】
paragraphs.chapter_id=chapters.id
paragraphs.character_id=characters.id
chapters.work_id=works.id

    【Question】
    What is the average number of characters in all the works of Shakespeare? average number = divide(sum(character_id), count(work_id))

    【Evidence】
    average number = divide(sum(character_id), count(work_id))

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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