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】 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 of the students joined two organization? joined two organization refers to COUNT(organ) > = 2

    【Evidence】
    joined two organization refers to COUNT(organ) > = 2

    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 >= 2
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 are enlisted in the Navy organization? enlisted in the navy organization refers to organ = 'navy';

    【Evidence】
    enlisted in the navy organization 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】
    How many male stuents do not have payment due? do not have payment due refers to bool = 'neg';

    【Evidence】
    do not have payment due refers to bool = 'neg';

    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 male AS T1 INNER JOIN no_payment_due AS T2 ON T1.name = T2.name WHERE T2.bool = 'neg'
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 are enlisted in the Peace Corps organization are enrolled in UCSD school? enlisted in the Peace Corps refers to organ = 'peace_corps'; enrolled in UCSD school refers to school = 'ucsd';

    【Evidence】
    enlisted in the Peace Corps refers to organ = 'peace_corps'; enrolled in UCSD school refers to school = 'ucsd';

    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 enlist AS T1 INNER JOIN enrolled AS T2 ON T1.name = T2.name WHERE T1.organ = 'peace_corps' AND T2.school = 'ucsd'
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 unemployed students, how many of them have no payment due? have no payment due refers to bool = 'neg';

    【Evidence】
    have no payment due refers to bool = 'neg';



    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 unemployed AS T1 INNER JOIN no_payment_due AS T2 ON T1.name = T2.name WHERE T2.bool = 'neg'
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 female students have no payment due? have no payment due refers to bool = 'neg'; female students refers to name NOT in male table

    【Evidence】
    have no payment due refers to bool = 'neg'; female students refers to name NOT in male table

    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 no_payment_due WHERE name NOT IN ( SELECT name FROM male )
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 unemployed students have never been absent? never been absent refers to month = 0;

    【Evidence】
    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(T2.name) FROM longest_absense_from_school AS T1 INNER JOIN unemployed AS T2 ON T2.name = T1.name WHERE T1.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】
    List at least 10 students who have no payment due and are enlisted in Fire Department organization. no payment due refers to bool = 'neg'; organization refers to organ; organ = 'fire_department';

    【Evidence】
    no payment due refers to bool = 'neg'; organization refers to organ; organ = 'fire_department';

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

SQL: SELECT T1.name FROM no_payment_due AS T1 INNER JOIN enlist AS T2 ON T2.name = T1.name WHERE T1.bool = 'neg' AND T2.organ = 'fire_department' LIMIT 10
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 female students are enlisted in the Navy organization? female students refers to enlist.name who are NOT in male.name; organization refers to organ; organ = 'navy';

    【Evidence】
    female students refers to enlist.name who are NOT in male.name; organization refers to organ; 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' AND name NOT IN ( SELECT name FROM male )
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 unemployed students are enlisted in the Army organization? organization refers to organ; organ = 'army';

    【Evidence】
    organization refers to organ; organ = 'army';

    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 enlist AS T1 INNER JOIN unemployed AS T2 ON T2.name = T1.name WHERE T1.organ = 'army'
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 unemployed students have payment due? have payment due refers to bool = 'pos';

    【Evidence】
    have payment due refers to bool = 'pos';

    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 no_payment_due AS T1 INNER JOIN unemployed AS T2 ON T2.name = T1.name WHERE T1.bool = 'pos'