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】 simpson_episodes
【Schema】
# Table: Credit
[
(episode_id:TEXT, Examples: [S20-E10, S20-E13, S20-E14]),
(category:TEXT, Examples: [Casting Department, Animation Department, Sound Department]),
(person:TEXT, Examples: [Bonita Pietila, Adam Kuhlman, Carlton Batten]),
(role:TEXT, Examples: [casting, additional timer, adr engineer]),
(credited:TEXT, Examples: [true, false])
]
# Table: Award
[
(award_id:INTEGER, Primary Key, Examples: [325, 326, 327]),
(organization:TEXT, Examples: [Primetime Emmy Awards]),
(year:INTEGER, Examples: [2009, 2010, 2017]),
(award_category:TEXT, Examples: [Primetime Emmy, Annie, Image Award]),
(award:TEXT),
(person:TEXT, Examples: [Dan Castellaneta, Hank Azaria, Harry Shearer]),
(role:TEXT, Examples: [executive producer]),
(episode_id:TEXT, Examples: [S20-E18, S20-E16, S20-E8]),
(season:TEXT),
(song:TEXT),
(result:TEXT, Examples: [Winner, Nominee])
]
# Table: Person
[
(name:TEXT, Primary Key, Examples: [Adam Greeley, Adam Klein, Adam Kuhlman]),
(birthdate:TEXT, Examples: [1963-05-04, 1975-03-30, 1969-12-04]),
(birth_name:TEXT, Examples: [Marc Edward Wilmore, Valentina Lantigua, Joseph Stewart Burns]),
(birth_place:TEXT, Examples: [USA, Brooklyn, Chicago]),
(birth_region:TEXT, Examples: [California, New York, Illinois]),
(birth_country:TEXT, Examples: [USA, Canada, Ireland]),
(height_meters:REAL, Examples: [1.85, 1.75, 2.03]),
(nickname:TEXT, Examples: [Jim, Doofus, Hoops])
]
# Table: Vote
[
(episode_id:TEXT, Examples: [S20-E1, S20-E10, S20-E11]),
(stars:INTEGER, Examples: [2, 3, 4]),
(votes:INTEGER, Examples: [16, 20, 36]),
(percent:REAL, Examples: [1.3, 1.7, 3.0])
]
# Table: Character_Award
[
(award_id:INTEGER, Examples: [325, 326, 327]),
(character:TEXT, Examples: [Homer Simpson, Moe Szyslak, Kent Brockman])
]
# Table: Episode
[
(episode_id:TEXT, Primary Key, Examples: [S20-E1, S20-E10, S20-E11]),
(season:INTEGER, Examples: [20]),
(episode:INTEGER, Examples: [1, 2, 3]),
(number_in_series:INTEGER, Examples: [421, 422, 423]),
(title:TEXT, Examples: [Sex, Pies and Idiot Scrapes]),
(summary:TEXT),
(air_date:TEXT, Examples: [2008-09-28, 2008-10-05, 2008-10-19]),
(episode_image:TEXT),
(rating:REAL, Examples: [7.2, 7.0, 7.1]),
(votes:INTEGER, Examples: [1192, 1055, 1015])
]
# Table: Keyword
[
(episode_id:TEXT, Primary Key, Examples: [S20-E1, S20-E10, S20-E11]),
(keyword:TEXT, Primary Key, Examples: [1930s to 2020s, erotic bakery, cake])
]
【Foreign keys】
Credit.episode_id=Episode.episode_id
Credit.person=Person.name
Award.person=Person.name
Award.episode_id=Episode.episode_id
Vote.episode_id=Episode.episode_id
Character_Award.award_id=Award.award_id
Keyword.episode_id=Episode.episode_id

    【Question】
    List out the title of episodes which have star score of 2. star score of 2 refers to stars = 2

    【Evidence】
    star score of 2 refers to stars = 2

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

SQL: SELECT T1.title FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T2.stars = 2;
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 simpson_episodes
【Schema】
# Table: Credit
[
(episode_id:TEXT, Examples: [S20-E10, S20-E13, S20-E14]),
(category:TEXT, Examples: [Casting Department, Animation Department, Sound Department]),
(person:TEXT, Examples: [Bonita Pietila, Adam Kuhlman, Carlton Batten]),
(role:TEXT, Examples: [casting, additional timer, adr engineer]),
(credited:TEXT, Examples: [true, false])
]
# Table: Award
[
(award_id:INTEGER, Primary Key, Examples: [325, 326, 327]),
(organization:TEXT, Examples: [Primetime Emmy Awards]),
(year:INTEGER, Examples: [2009, 2010, 2017]),
(award_category:TEXT, Examples: [Primetime Emmy, Annie, Image Award]),
(award:TEXT),
(person:TEXT, Examples: [Dan Castellaneta, Hank Azaria, Harry Shearer]),
(role:TEXT, Examples: [executive producer]),
(episode_id:TEXT, Examples: [S20-E18, S20-E16, S20-E8]),
(season:TEXT),
(song:TEXT),
(result:TEXT, Examples: [Winner, Nominee])
]
# Table: Person
[
(name:TEXT, Primary Key, Examples: [Adam Greeley, Adam Klein, Adam Kuhlman]),
(birthdate:TEXT, Examples: [1963-05-04, 1975-03-30, 1969-12-04]),
(birth_name:TEXT, Examples: [Marc Edward Wilmore, Valentina Lantigua, Joseph Stewart Burns]),
(birth_place:TEXT, Examples: [USA, Brooklyn, Chicago]),
(birth_region:TEXT, Examples: [California, New York, Illinois]),
(birth_country:TEXT, Examples: [USA, Canada, Ireland]),
(height_meters:REAL, Examples: [1.85, 1.75, 2.03]),
(nickname:TEXT, Examples: [Jim, Doofus, Hoops])
]
# Table: Vote
[
(episode_id:TEXT, Examples: [S20-E1, S20-E10, S20-E11]),
(stars:INTEGER, Examples: [2, 3, 4]),
(votes:INTEGER, Examples: [16, 20, 36]),
(percent:REAL, Examples: [1.3, 1.7, 3.0])
]
# Table: Character_Award
[
(award_id:INTEGER, Examples: [325, 326, 327]),
(character:TEXT, Examples: [Homer Simpson, Moe Szyslak, Kent Brockman])
]
# Table: Episode
[
(episode_id:TEXT, Primary Key, Examples: [S20-E1, S20-E10, S20-E11]),
(season:INTEGER, Examples: [20]),
(episode:INTEGER, Examples: [1, 2, 3]),
(number_in_series:INTEGER, Examples: [421, 422, 423]),
(title:TEXT, Examples: [Sex, Pies and Idiot Scrapes]),
(summary:TEXT),
(air_date:TEXT, Examples: [2008-09-28, 2008-10-05, 2008-10-19]),
(episode_image:TEXT),
(rating:REAL, Examples: [7.2, 7.0, 7.1]),
(votes:INTEGER, Examples: [1192, 1055, 1015])
]
# Table: Keyword
[
(episode_id:TEXT, Primary Key, Examples: [S20-E1, S20-E10, S20-E11]),
(keyword:TEXT, Primary Key, Examples: [1930s to 2020s, erotic bakery, cake])
]
【Foreign keys】
Credit.episode_id=Episode.episode_id
Credit.person=Person.name
Award.person=Person.name
Award.episode_id=Episode.episode_id
Vote.episode_id=Episode.episode_id
Character_Award.award_id=Award.award_id
Keyword.episode_id=Episode.episode_id

    【Question】
    Which are the years that character Mr. Burns won an award?

    【Evidence】
    

    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.year FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T2.character = 'Mr. Burns';
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 simpson_episodes
【Schema】
# Table: Credit
[
(episode_id:TEXT, Examples: [S20-E10, S20-E13, S20-E14]),
(category:TEXT, Examples: [Casting Department, Animation Department, Sound Department]),
(person:TEXT, Examples: [Bonita Pietila, Adam Kuhlman, Carlton Batten]),
(role:TEXT, Examples: [casting, additional timer, adr engineer]),
(credited:TEXT, Examples: [true, false])
]
# Table: Award
[
(award_id:INTEGER, Primary Key, Examples: [325, 326, 327]),
(organization:TEXT, Examples: [Primetime Emmy Awards]),
(year:INTEGER, Examples: [2009, 2010, 2017]),
(award_category:TEXT, Examples: [Primetime Emmy, Annie, Image Award]),
(award:TEXT),
(person:TEXT, Examples: [Dan Castellaneta, Hank Azaria, Harry Shearer]),
(role:TEXT, Examples: [executive producer]),
(episode_id:TEXT, Examples: [S20-E18, S20-E16, S20-E8]),
(season:TEXT),
(song:TEXT),
(result:TEXT, Examples: [Winner, Nominee])
]
# Table: Person
[
(name:TEXT, Primary Key, Examples: [Adam Greeley, Adam Klein, Adam Kuhlman]),
(birthdate:TEXT, Examples: [1963-05-04, 1975-03-30, 1969-12-04]),
(birth_name:TEXT, Examples: [Marc Edward Wilmore, Valentina Lantigua, Joseph Stewart Burns]),
(birth_place:TEXT, Examples: [USA, Brooklyn, Chicago]),
(birth_region:TEXT, Examples: [California, New York, Illinois]),
(birth_country:TEXT, Examples: [USA, Canada, Ireland]),
(height_meters:REAL, Examples: [1.85, 1.75, 2.03]),
(nickname:TEXT, Examples: [Jim, Doofus, Hoops])
]
# Table: Vote
[
(episode_id:TEXT, Examples: [S20-E1, S20-E10, S20-E11]),
(stars:INTEGER, Examples: [2, 3, 4]),
(votes:INTEGER, Examples: [16, 20, 36]),
(percent:REAL, Examples: [1.3, 1.7, 3.0])
]
# Table: Character_Award
[
(award_id:INTEGER, Examples: [325, 326, 327]),
(character:TEXT, Examples: [Homer Simpson, Moe Szyslak, Kent Brockman])
]
# Table: Episode
[
(episode_id:TEXT, Primary Key, Examples: [S20-E1, S20-E10, S20-E11]),
(season:INTEGER, Examples: [20]),
(episode:INTEGER, Examples: [1, 2, 3]),
(number_in_series:INTEGER, Examples: [421, 422, 423]),
(title:TEXT, Examples: [Sex, Pies and Idiot Scrapes]),
(summary:TEXT),
(air_date:TEXT, Examples: [2008-09-28, 2008-10-05, 2008-10-19]),
(episode_image:TEXT),
(rating:REAL, Examples: [7.2, 7.0, 7.1]),
(votes:INTEGER, Examples: [1192, 1055, 1015])
]
# Table: Keyword
[
(episode_id:TEXT, Primary Key, Examples: [S20-E1, S20-E10, S20-E11]),
(keyword:TEXT, Primary Key, Examples: [1930s to 2020s, erotic bakery, cake])
]
【Foreign keys】
Credit.episode_id=Episode.episode_id
Credit.person=Person.name
Award.person=Person.name
Award.episode_id=Episode.episode_id
Vote.episode_id=Episode.episode_id
Character_Award.award_id=Award.award_id
Keyword.episode_id=Episode.episode_id

    【Question】
    What are the keywords of the episode which has title as Dangerous Curves?

    【Evidence】
    

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

SQL: SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Dangerous Curves';
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 simpson_episodes
【Schema】
# Table: Credit
[
(episode_id:TEXT, Examples: [S20-E10, S20-E13, S20-E14]),
(category:TEXT, Examples: [Casting Department, Animation Department, Sound Department]),
(person:TEXT, Examples: [Bonita Pietila, Adam Kuhlman, Carlton Batten]),
(role:TEXT, Examples: [casting, additional timer, adr engineer]),
(credited:TEXT, Examples: [true, false])
]
# Table: Award
[
(award_id:INTEGER, Primary Key, Examples: [325, 326, 327]),
(organization:TEXT, Examples: [Primetime Emmy Awards]),
(year:INTEGER, Examples: [2009, 2010, 2017]),
(award_category:TEXT, Examples: [Primetime Emmy, Annie, Image Award]),
(award:TEXT),
(person:TEXT, Examples: [Dan Castellaneta, Hank Azaria, Harry Shearer]),
(role:TEXT, Examples: [executive producer]),
(episode_id:TEXT, Examples: [S20-E18, S20-E16, S20-E8]),
(season:TEXT),
(song:TEXT),
(result:TEXT, Examples: [Winner, Nominee])
]
# Table: Person
[
(name:TEXT, Primary Key, Examples: [Adam Greeley, Adam Klein, Adam Kuhlman]),
(birthdate:TEXT, Examples: [1963-05-04, 1975-03-30, 1969-12-04]),
(birth_name:TEXT, Examples: [Marc Edward Wilmore, Valentina Lantigua, Joseph Stewart Burns]),
(birth_place:TEXT, Examples: [USA, Brooklyn, Chicago]),
(birth_region:TEXT, Examples: [California, New York, Illinois]),
(birth_country:TEXT, Examples: [USA, Canada, Ireland]),
(height_meters:REAL, Examples: [1.85, 1.75, 2.03]),
(nickname:TEXT, Examples: [Jim, Doofus, Hoops])
]
# Table: Vote
[
(episode_id:TEXT, Examples: [S20-E1, S20-E10, S20-E11]),
(stars:INTEGER, Examples: [2, 3, 4]),
(votes:INTEGER, Examples: [16, 20, 36]),
(percent:REAL, Examples: [1.3, 1.7, 3.0])
]
# Table: Character_Award
[
(award_id:INTEGER, Examples: [325, 326, 327]),
(character:TEXT, Examples: [Homer Simpson, Moe Szyslak, Kent Brockman])
]
# Table: Episode
[
(episode_id:TEXT, Primary Key, Examples: [S20-E1, S20-E10, S20-E11]),
(season:INTEGER, Examples: [20]),
(episode:INTEGER, Examples: [1, 2, 3]),
(number_in_series:INTEGER, Examples: [421, 422, 423]),
(title:TEXT, Examples: [Sex, Pies and Idiot Scrapes]),
(summary:TEXT),
(air_date:TEXT, Examples: [2008-09-28, 2008-10-05, 2008-10-19]),
(episode_image:TEXT),
(rating:REAL, Examples: [7.2, 7.0, 7.1]),
(votes:INTEGER, Examples: [1192, 1055, 1015])
]
# Table: Keyword
[
(episode_id:TEXT, Primary Key, Examples: [S20-E1, S20-E10, S20-E11]),
(keyword:TEXT, Primary Key, Examples: [1930s to 2020s, erotic bakery, cake])
]
【Foreign keys】
Credit.episode_id=Episode.episode_id
Credit.person=Person.name
Award.person=Person.name
Award.episode_id=Episode.episode_id
Vote.episode_id=Episode.episode_id
Character_Award.award_id=Award.award_id
Keyword.episode_id=Episode.episode_id

    【Question】
    What is the total number of episode with a rating below 7? rating below 7 refers to rating < 7

    【Evidence】
    rating below 7 refers to rating < 7

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

SQL: SELECT COUNT(episode_id) FROM Episode WHERE rating < 7;
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 simpson_episodes
【Schema】
# Table: Credit
[
(episode_id:TEXT, Examples: [S20-E10, S20-E13, S20-E14]),
(category:TEXT, Examples: [Casting Department, Animation Department, Sound Department]),
(person:TEXT, Examples: [Bonita Pietila, Adam Kuhlman, Carlton Batten]),
(role:TEXT, Examples: [casting, additional timer, adr engineer]),
(credited:TEXT, Examples: [true, false])
]
# Table: Award
[
(award_id:INTEGER, Primary Key, Examples: [325, 326, 327]),
(organization:TEXT, Examples: [Primetime Emmy Awards]),
(year:INTEGER, Examples: [2009, 2010, 2017]),
(award_category:TEXT, Examples: [Primetime Emmy, Annie, Image Award]),
(award:TEXT),
(person:TEXT, Examples: [Dan Castellaneta, Hank Azaria, Harry Shearer]),
(role:TEXT, Examples: [executive producer]),
(episode_id:TEXT, Examples: [S20-E18, S20-E16, S20-E8]),
(season:TEXT),
(song:TEXT),
(result:TEXT, Examples: [Winner, Nominee])
]
# Table: Person
[
(name:TEXT, Primary Key, Examples: [Adam Greeley, Adam Klein, Adam Kuhlman]),
(birthdate:TEXT, Examples: [1963-05-04, 1975-03-30, 1969-12-04]),
(birth_name:TEXT, Examples: [Marc Edward Wilmore, Valentina Lantigua, Joseph Stewart Burns]),
(birth_place:TEXT, Examples: [USA, Brooklyn, Chicago]),
(birth_region:TEXT, Examples: [California, New York, Illinois]),
(birth_country:TEXT, Examples: [USA, Canada, Ireland]),
(height_meters:REAL, Examples: [1.85, 1.75, 2.03]),
(nickname:TEXT, Examples: [Jim, Doofus, Hoops])
]
# Table: Vote
[
(episode_id:TEXT, Examples: [S20-E1, S20-E10, S20-E11]),
(stars:INTEGER, Examples: [2, 3, 4]),
(votes:INTEGER, Examples: [16, 20, 36]),
(percent:REAL, Examples: [1.3, 1.7, 3.0])
]
# Table: Character_Award
[
(award_id:INTEGER, Examples: [325, 326, 327]),
(character:TEXT, Examples: [Homer Simpson, Moe Szyslak, Kent Brockman])
]
# Table: Episode
[
(episode_id:TEXT, Primary Key, Examples: [S20-E1, S20-E10, S20-E11]),
(season:INTEGER, Examples: [20]),
(episode:INTEGER, Examples: [1, 2, 3]),
(number_in_series:INTEGER, Examples: [421, 422, 423]),
(title:TEXT, Examples: [Sex, Pies and Idiot Scrapes]),
(summary:TEXT),
(air_date:TEXT, Examples: [2008-09-28, 2008-10-05, 2008-10-19]),
(episode_image:TEXT),
(rating:REAL, Examples: [7.2, 7.0, 7.1]),
(votes:INTEGER, Examples: [1192, 1055, 1015])
]
# Table: Keyword
[
(episode_id:TEXT, Primary Key, Examples: [S20-E1, S20-E10, S20-E11]),
(keyword:TEXT, Primary Key, Examples: [1930s to 2020s, erotic bakery, cake])
]
【Foreign keys】
Credit.episode_id=Episode.episode_id
Credit.person=Person.name
Award.person=Person.name
Award.episode_id=Episode.episode_id
Vote.episode_id=Episode.episode_id
Character_Award.award_id=Award.award_id
Keyword.episode_id=Episode.episode_id

    【Question】
    What is the episode ID that received 2 stars and 9 votes? 2 stars refers to stars = 2; 9 votes refers to votes = 9

    【Evidence】
    2 stars refers to stars = 2; 9 votes refers to votes = 9

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

SQL: SELECT episode_id FROM Vote WHERE stars = 2 AND votes = 9;
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 student_loan
【Schema】
# Table: unemployed
[
(name:TEXT, Primary Key, Examples: [student1000, student102, student106])
]
# Table: longest_absense_from_school
[
(name:TEXT, Primary Key, Examples: [student1, student10, student100]),
(month:INTEGER, Examples: [0, 1, 2])
]
# Table: disabled
[
(name:TEXT, Primary Key, Examples: [student114, student125, student142])
]
# Table: person
[
(name:TEXT, Primary Key, Examples: [student1, student10, student100])
]
# Table: male
[
(name:TEXT, Primary Key, Examples: [student1, student101, student102])
]
# Table: no_payment_due
[
(name:TEXT, Primary Key, Examples: [student1, student10, student100]),
(bool:TEXT, Examples: [neg, pos])
]
# Table: enrolled
[
(name:TEXT, Primary Key, Examples: [student1, student10, student100]),
(school:TEXT, Primary Key, Examples: [occ, smc, ucb]),
(month:INTEGER, Examples: [1, 2, 3])
]
# Table: enlist
[
(name:TEXT, Examples: [student40, student51, student109]),
(organ:TEXT, Examples: [fire_department, air_force, navy])
]
# Table: bool
[
(name:TEXT, Primary Key, Examples: [neg, pos])
]
# Table: filed_for_bankrupcy
[
(name:TEXT, Primary Key, Examples: [student122, student126, student136])
]
【Foreign keys】
unemployed.name=person.name
longest_absense_from_school.name=person.name
disabled.name=person.name
male.name=person.name
no_payment_due.name=person.name
no_payment_due.bool=bool.name
enrolled.name=person.name
enlist.name=person.name
filed_for_bankrupcy.name=person.name

    【Question】
    How many students have never been absent from school? have never been absent refers to `month` = 0;

    【Evidence】
    have never been absent refers to `month` = 0;

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

SQL: SELECT COUNT(name) FROM longest_absense_from_school WHERE `month` = 0
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 student_loan
【Schema】
# Table: unemployed
[
(name:TEXT, Primary Key, Examples: [student1000, student102, student106])
]
# Table: longest_absense_from_school
[
(name:TEXT, Primary Key, Examples: [student1, student10, student100]),
(month:INTEGER, Examples: [0, 1, 2])
]
# Table: disabled
[
(name:TEXT, Primary Key, Examples: [student114, student125, student142])
]
# Table: person
[
(name:TEXT, Primary Key, Examples: [student1, student10, student100])
]
# Table: male
[
(name:TEXT, Primary Key, Examples: [student1, student101, student102])
]
# Table: no_payment_due
[
(name:TEXT, Primary Key, Examples: [student1, student10, student100]),
(bool:TEXT, Examples: [neg, pos])
]
# Table: enrolled
[
(name:TEXT, Primary Key, Examples: [student1, student10, student100]),
(school:TEXT, Primary Key, Examples: [occ, smc, ucb]),
(month:INTEGER, Examples: [1, 2, 3])
]
# Table: enlist
[
(name:TEXT, Examples: [student40, student51, student109]),
(organ:TEXT, Examples: [fire_department, air_force, navy])
]
# Table: bool
[
(name:TEXT, Primary Key, Examples: [neg, pos])
]
# Table: filed_for_bankrupcy
[
(name:TEXT, Primary Key, Examples: [student122, student126, student136])
]
【Foreign keys】
unemployed.name=person.name
longest_absense_from_school.name=person.name
disabled.name=person.name
male.name=person.name
no_payment_due.name=person.name
no_payment_due.bool=bool.name
enrolled.name=person.name
enlist.name=person.name
filed_for_bankrupcy.name=person.name

    【Question】
    For the students who have been absent from school for the longest time, how many months have they been absent? absent from school for the longest time refers to MAX(month)

    【Evidence】
    absent from school for the longest time refers to MAX(month)

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

SQL: SELECT MAX(month) FROM longest_absense_from_school
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 student_loan
【Schema】
# Table: unemployed
[
(name:TEXT, Primary Key, Examples: [student1000, student102, student106])
]
# Table: longest_absense_from_school
[
(name:TEXT, Primary Key, Examples: [student1, student10, student100]),
(month:INTEGER, Examples: [0, 1, 2])
]
# Table: disabled
[
(name:TEXT, Primary Key, Examples: [student114, student125, student142])
]
# Table: person
[
(name:TEXT, Primary Key, Examples: [student1, student10, student100])
]
# Table: male
[
(name:TEXT, Primary Key, Examples: [student1, student101, student102])
]
# Table: no_payment_due
[
(name:TEXT, Primary Key, Examples: [student1, student10, student100]),
(bool:TEXT, Examples: [neg, pos])
]
# Table: enrolled
[
(name:TEXT, Primary Key, Examples: [student1, student10, student100]),
(school:TEXT, Primary Key, Examples: [occ, smc, ucb]),
(month:INTEGER, Examples: [1, 2, 3])
]
# Table: enlist
[
(name:TEXT, Examples: [student40, student51, student109]),
(organ:TEXT, Examples: [fire_department, air_force, navy])
]
# Table: bool
[
(name:TEXT, Primary Key, Examples: [neg, pos])
]
# Table: filed_for_bankrupcy
[
(name:TEXT, Primary Key, Examples: [student122, student126, student136])
]
【Foreign keys】
unemployed.name=person.name
longest_absense_from_school.name=person.name
disabled.name=person.name
male.name=person.name
no_payment_due.name=person.name
no_payment_due.bool=bool.name
enrolled.name=person.name
enlist.name=person.name
filed_for_bankrupcy.name=person.name

    【Question】
    How many students belong to the navy department? belong to the navy department refers to organ = 'navy';

    【Evidence】
    belong to the navy department refers to organ = 'navy';

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

SQL: SELECT COUNT(name) FROM enlist WHERE organ = 'navy'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 student_loan
【Schema】
# Table: unemployed
[
(name:TEXT, Primary Key, Examples: [student1000, student102, student106])
]
# Table: longest_absense_from_school
[
(name:TEXT, Primary Key, Examples: [student1, student10, student100]),
(month:INTEGER, Examples: [0, 1, 2])
]
# Table: disabled
[
(name:TEXT, Primary Key, Examples: [student114, student125, student142])
]
# Table: person
[
(name:TEXT, Primary Key, Examples: [student1, student10, student100])
]
# Table: male
[
(name:TEXT, Primary Key, Examples: [student1, student101, student102])
]
# Table: no_payment_due
[
(name:TEXT, Primary Key, Examples: [student1, student10, student100]),
(bool:TEXT, Examples: [neg, pos])
]
# Table: enrolled
[
(name:TEXT, Primary Key, Examples: [student1, student10, student100]),
(school:TEXT, Primary Key, Examples: [occ, smc, ucb]),
(month:INTEGER, Examples: [1, 2, 3])
]
# Table: enlist
[
(name:TEXT, Examples: [student40, student51, student109]),
(organ:TEXT, Examples: [fire_department, air_force, navy])
]
# Table: bool
[
(name:TEXT, Primary Key, Examples: [neg, pos])
]
# Table: filed_for_bankrupcy
[
(name:TEXT, Primary Key, Examples: [student122, student126, student136])
]
【Foreign keys】
unemployed.name=person.name
longest_absense_from_school.name=person.name
disabled.name=person.name
male.name=person.name
no_payment_due.name=person.name
no_payment_due.bool=bool.name
enrolled.name=person.name
enlist.name=person.name
filed_for_bankrupcy.name=person.name

    【Question】
    Among the students that have been absent from school for more than 5 months, how many of them are male? absent from school for more than 5 months refers to `month`  > = 5;

    【Evidence】
    absent from school for more than 5 months refers to `month`  > = 5;

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

SQL: SELECT COUNT(T1.name) FROM longest_absense_from_school AS T1 INNER JOIN male AS T2 ON T1.`name` = T2.`name` WHERE T1.`month` >= 5