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】 software_company
【Schema】
# Table: Customers
[
(ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(SEX:TEXT, Examples: [Male, Female]),
(MARITAL_STATUS:TEXT, Examples: [Never-married, Married-civ-spouse, Divorced]),
(GEOID:INTEGER, Examples: [61, 70, 53]),
(EDUCATIONNUM:INTEGER, Examples: [7, 3, 4]),
(OCCUPATION:TEXT, Examples: [Machine-op-inspct, Handlers-cleaners, Exec-managerial]),
(age:INTEGER, Examples: [62, 78, 69])
]
# Table: Mailings1_2
[
(REFID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(REF_DATE:DATETIME, Examples: [2007-02-01 12:00:00]),
(RESPONSE:TEXT, Examples: [false, true])
]
# Table: mailings3
[
(REFID:INTEGER, Primary Key, Examples: [60000, 60001, 60002]),
(REF_DATE:DATETIME, Examples: [2007-07-01 12:00:00]),
(RESPONSE:TEXT, Examples: [false, true])
]
# Table: Demog
[
(GEOID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(INHABITANTS_K:REAL, Examples: [30.046, 36.25, 47.645]),
(INCOME_K:REAL, Examples: [2631.47, 3012.75, 2192.41]),
(A_VAR1:REAL, Examples: [6.084, 4.604, 4.911]),
(A_VAR2:REAL, Examples: [5.79, 8.309, 8.557]),
(A_VAR3:REAL, Examples: [8.595, 6.007, 5.934]),
(A_VAR4:REAL, Examples: [3.935, 5.938, 6.494]),
(A_VAR5:REAL, Examples: [6.362, 8.773, 9.172]),
(A_VAR6:REAL, Examples: [8.626, 3.579, 3.202]),
(A_VAR7:REAL, Examples: [4.624, 6.349, 6.157]),
(A_VAR8:REAL, Examples: [8.324, 4.694, 4.822]),
(A_VAR9:REAL, Examples: [5.233, 6.884, 7.942]),
(A_VAR10:REAL, Examples: [6.232, 7.062, 7.901]),
(A_VAR11:REAL, Examples: [5.205, 7.319, 7.928]),
(A_VAR12:REAL, Examples: [8.231, 3.72, 2.33]),
(A_VAR13:REAL, Examples: [6.746, 6.405, 6.029]),
(A_VAR14:REAL, Examples: [8.679, 7.202, 6.455]),
(A_VAR15:REAL, Examples: [5.292, 4.932, 4.72]),
(A_VAR16:REAL, Examples: [3.5, 7.969, 8.564]),
(A_VAR17:REAL, Examples: [5.512, 8.15, 8.342]),
(A_VAR18:REAL, Examples: [5.783, 5.633, 4.938])
]
# Table: Sales
[
(EVENTID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(REFID:INTEGER, Examples: [0, 1, 2]),
(EVENT_DATE:DATETIME, Examples: [2006-12-21 12:00:00]),
(AMOUNT:REAL, Examples: [17.907, 17.401, 13.277])
]
【Foreign keys】
Customers.GEOID=Demog.GEOID
Mailings1_2.REFID=Customers.ID
Sales.REFID=Customers.ID

    【Question】
    Among the geographic ID which has 33.658K of inhabitants, describe the education, occupation and age of female widow. geographic ID which has 33.658K of inhabitants refers to GEOID where INHABITANTS_K = 33.658; education refers to EDUCATIONNUM; female widow refers to SEX = 'Female' where MARITAL_STATUS = 'Widowed';

    【Evidence】
    geographic ID which has 33.658K of inhabitants refers to GEOID where INHABITANTS_K = 33.658; education refers to EDUCATIONNUM; female widow refers to SEX = 'Female' where MARITAL_STATUS = 'Widowed';

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

SQL: SELECT T1.EDUCATIONNUM, T1.OCCUPATION, T1.age FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T2.INHABITANTS_K = 33.658 AND T1.SEX = 'Female' AND T1.MARITAL_STATUS = 'Widowed'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 software_company
【Schema】
# Table: Customers
[
(ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(SEX:TEXT, Examples: [Male, Female]),
(MARITAL_STATUS:TEXT, Examples: [Never-married, Married-civ-spouse, Divorced]),
(GEOID:INTEGER, Examples: [61, 70, 53]),
(EDUCATIONNUM:INTEGER, Examples: [7, 3, 4]),
(OCCUPATION:TEXT, Examples: [Machine-op-inspct, Handlers-cleaners, Exec-managerial]),
(age:INTEGER, Examples: [62, 78, 69])
]
# Table: Mailings1_2
[
(REFID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(REF_DATE:DATETIME, Examples: [2007-02-01 12:00:00]),
(RESPONSE:TEXT, Examples: [false, true])
]
# Table: mailings3
[
(REFID:INTEGER, Primary Key, Examples: [60000, 60001, 60002]),
(REF_DATE:DATETIME, Examples: [2007-07-01 12:00:00]),
(RESPONSE:TEXT, Examples: [false, true])
]
# Table: Demog
[
(GEOID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(INHABITANTS_K:REAL, Examples: [30.046, 36.25, 47.645]),
(INCOME_K:REAL, Examples: [2631.47, 3012.75, 2192.41]),
(A_VAR1:REAL, Examples: [6.084, 4.604, 4.911]),
(A_VAR2:REAL, Examples: [5.79, 8.309, 8.557]),
(A_VAR3:REAL, Examples: [8.595, 6.007, 5.934]),
(A_VAR4:REAL, Examples: [3.935, 5.938, 6.494]),
(A_VAR5:REAL, Examples: [6.362, 8.773, 9.172]),
(A_VAR6:REAL, Examples: [8.626, 3.579, 3.202]),
(A_VAR7:REAL, Examples: [4.624, 6.349, 6.157]),
(A_VAR8:REAL, Examples: [8.324, 4.694, 4.822]),
(A_VAR9:REAL, Examples: [5.233, 6.884, 7.942]),
(A_VAR10:REAL, Examples: [6.232, 7.062, 7.901]),
(A_VAR11:REAL, Examples: [5.205, 7.319, 7.928]),
(A_VAR12:REAL, Examples: [8.231, 3.72, 2.33]),
(A_VAR13:REAL, Examples: [6.746, 6.405, 6.029]),
(A_VAR14:REAL, Examples: [8.679, 7.202, 6.455]),
(A_VAR15:REAL, Examples: [5.292, 4.932, 4.72]),
(A_VAR16:REAL, Examples: [3.5, 7.969, 8.564]),
(A_VAR17:REAL, Examples: [5.512, 8.15, 8.342]),
(A_VAR18:REAL, Examples: [5.783, 5.633, 4.938])
]
# Table: Sales
[
(EVENTID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(REFID:INTEGER, Examples: [0, 1, 2]),
(EVENT_DATE:DATETIME, Examples: [2006-12-21 12:00:00]),
(AMOUNT:REAL, Examples: [17.907, 17.401, 13.277])
]
【Foreign keys】
Customers.GEOID=Demog.GEOID
Mailings1_2.REFID=Customers.ID
Sales.REFID=Customers.ID

    【Question】
    Find the response status to customer whose geographic ID of 134. GEOID = 134;

    【Evidence】
    GEOID = 134;

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

SQL: SELECT T2.RESPONSE FROM Customers AS T1 INNER JOIN mailings3 AS T2 ON T1.ID = T2.REFID WHERE T1.GEOID = 134
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 software_company
【Schema】
# Table: Customers
[
(ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(SEX:TEXT, Examples: [Male, Female]),
(MARITAL_STATUS:TEXT, Examples: [Never-married, Married-civ-spouse, Divorced]),
(GEOID:INTEGER, Examples: [61, 70, 53]),
(EDUCATIONNUM:INTEGER, Examples: [7, 3, 4]),
(OCCUPATION:TEXT, Examples: [Machine-op-inspct, Handlers-cleaners, Exec-managerial]),
(age:INTEGER, Examples: [62, 78, 69])
]
# Table: Mailings1_2
[
(REFID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(REF_DATE:DATETIME, Examples: [2007-02-01 12:00:00]),
(RESPONSE:TEXT, Examples: [false, true])
]
# Table: mailings3
[
(REFID:INTEGER, Primary Key, Examples: [60000, 60001, 60002]),
(REF_DATE:DATETIME, Examples: [2007-07-01 12:00:00]),
(RESPONSE:TEXT, Examples: [false, true])
]
# Table: Demog
[
(GEOID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(INHABITANTS_K:REAL, Examples: [30.046, 36.25, 47.645]),
(INCOME_K:REAL, Examples: [2631.47, 3012.75, 2192.41]),
(A_VAR1:REAL, Examples: [6.084, 4.604, 4.911]),
(A_VAR2:REAL, Examples: [5.79, 8.309, 8.557]),
(A_VAR3:REAL, Examples: [8.595, 6.007, 5.934]),
(A_VAR4:REAL, Examples: [3.935, 5.938, 6.494]),
(A_VAR5:REAL, Examples: [6.362, 8.773, 9.172]),
(A_VAR6:REAL, Examples: [8.626, 3.579, 3.202]),
(A_VAR7:REAL, Examples: [4.624, 6.349, 6.157]),
(A_VAR8:REAL, Examples: [8.324, 4.694, 4.822]),
(A_VAR9:REAL, Examples: [5.233, 6.884, 7.942]),
(A_VAR10:REAL, Examples: [6.232, 7.062, 7.901]),
(A_VAR11:REAL, Examples: [5.205, 7.319, 7.928]),
(A_VAR12:REAL, Examples: [8.231, 3.72, 2.33]),
(A_VAR13:REAL, Examples: [6.746, 6.405, 6.029]),
(A_VAR14:REAL, Examples: [8.679, 7.202, 6.455]),
(A_VAR15:REAL, Examples: [5.292, 4.932, 4.72]),
(A_VAR16:REAL, Examples: [3.5, 7.969, 8.564]),
(A_VAR17:REAL, Examples: [5.512, 8.15, 8.342]),
(A_VAR18:REAL, Examples: [5.783, 5.633, 4.938])
]
# Table: Sales
[
(EVENTID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(REFID:INTEGER, Examples: [0, 1, 2]),
(EVENT_DATE:DATETIME, Examples: [2006-12-21 12:00:00]),
(AMOUNT:REAL, Examples: [17.907, 17.401, 13.277])
]
【Foreign keys】
Customers.GEOID=Demog.GEOID
Mailings1_2.REFID=Customers.ID
Sales.REFID=Customers.ID

    【Question】
    Describe the average income per month and yearly income of the geographic ID in which customer of ID "209556" and "290135". the average income per month refers to INCOME_K; yearly income of geographic ID refers to GEOID where MULTIPLY(INHABITANTS_K, INCOME_K, 12);

    【Evidence】
    the average income per month refers to INCOME_K; yearly income of geographic ID refers to GEOID where MULTIPLY(INHABITANTS_K, INCOME_K, 12);

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

SQL: SELECT T2.INCOME_K, T2.INHABITANTS_K * T2.INCOME_K * 12 FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.ID = 209556 OR T1.ID = 290135
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 software_company
【Schema】
# Table: Customers
[
(ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(SEX:TEXT, Examples: [Male, Female]),
(MARITAL_STATUS:TEXT, Examples: [Never-married, Married-civ-spouse, Divorced]),
(GEOID:INTEGER, Examples: [61, 70, 53]),
(EDUCATIONNUM:INTEGER, Examples: [7, 3, 4]),
(OCCUPATION:TEXT, Examples: [Machine-op-inspct, Handlers-cleaners, Exec-managerial]),
(age:INTEGER, Examples: [62, 78, 69])
]
# Table: Mailings1_2
[
(REFID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(REF_DATE:DATETIME, Examples: [2007-02-01 12:00:00]),
(RESPONSE:TEXT, Examples: [false, true])
]
# Table: mailings3
[
(REFID:INTEGER, Primary Key, Examples: [60000, 60001, 60002]),
(REF_DATE:DATETIME, Examples: [2007-07-01 12:00:00]),
(RESPONSE:TEXT, Examples: [false, true])
]
# Table: Demog
[
(GEOID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(INHABITANTS_K:REAL, Examples: [30.046, 36.25, 47.645]),
(INCOME_K:REAL, Examples: [2631.47, 3012.75, 2192.41]),
(A_VAR1:REAL, Examples: [6.084, 4.604, 4.911]),
(A_VAR2:REAL, Examples: [5.79, 8.309, 8.557]),
(A_VAR3:REAL, Examples: [8.595, 6.007, 5.934]),
(A_VAR4:REAL, Examples: [3.935, 5.938, 6.494]),
(A_VAR5:REAL, Examples: [6.362, 8.773, 9.172]),
(A_VAR6:REAL, Examples: [8.626, 3.579, 3.202]),
(A_VAR7:REAL, Examples: [4.624, 6.349, 6.157]),
(A_VAR8:REAL, Examples: [8.324, 4.694, 4.822]),
(A_VAR9:REAL, Examples: [5.233, 6.884, 7.942]),
(A_VAR10:REAL, Examples: [6.232, 7.062, 7.901]),
(A_VAR11:REAL, Examples: [5.205, 7.319, 7.928]),
(A_VAR12:REAL, Examples: [8.231, 3.72, 2.33]),
(A_VAR13:REAL, Examples: [6.746, 6.405, 6.029]),
(A_VAR14:REAL, Examples: [8.679, 7.202, 6.455]),
(A_VAR15:REAL, Examples: [5.292, 4.932, 4.72]),
(A_VAR16:REAL, Examples: [3.5, 7.969, 8.564]),
(A_VAR17:REAL, Examples: [5.512, 8.15, 8.342]),
(A_VAR18:REAL, Examples: [5.783, 5.633, 4.938])
]
# Table: Sales
[
(EVENTID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(REFID:INTEGER, Examples: [0, 1, 2]),
(EVENT_DATE:DATETIME, Examples: [2006-12-21 12:00:00]),
(AMOUNT:REAL, Examples: [17.907, 17.401, 13.277])
]
【Foreign keys】
Customers.GEOID=Demog.GEOID
Mailings1_2.REFID=Customers.ID
Sales.REFID=Customers.ID

    【Question】
    Among the reference ID of under 10 who got response by marketing department, compare their education status. reference ID of under 10 refers to REFID < 10; got response refers to RESPONSE = 'true'; education status refers to EDUCATIONNUM;

    【Evidence】
    reference ID of under 10 refers to REFID < 10; got response refers to RESPONSE = 'true'; education status refers to EDUCATIONNUM;

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

SQL: SELECT T1.EDUCATIONNUM FROM Customers AS T1 INNER JOIN Mailings1_2 AS T2 ON T1.ID = T2.REFID WHERE T2.REFID < 10 AND T2.RESPONSE = 'true'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 food_inspection
【Schema】
# Table: inspections
[
(business_id:INTEGER, Examples: [10, 24, 31]),
(score:INTEGER, Examples: [92, 94, 82]),
(date:DATE, Examples: [2014-01-14]),
(type:TEXT, Examples: [Routine - Unscheduled])
]
# Table: violations
[
(business_id:INTEGER, Examples: [10, 24, 31]),
(date:DATE, Examples: [2014-07-29]),
(violation_type_id:TEXT, Examples: [103129, 103144, 103119]),
(risk_category:TEXT, Examples: [Moderate Risk, Low Risk, High Risk]),
(description:TEXT, Examples: [Insufficient hot water or running water])
]
# Table: businesses
[
(business_id:INTEGER, Primary Key, Examples: [10, 24, 31]),
(name:TEXT, Examples: [Tiramisu Kitchen]),
(address:TEXT, Examples: [033 Belden Pl]),
(city:TEXT, Examples: [San Francisco, S.F., SAN FRANCISCO]),
(postal_code:TEXT, Examples: [94104, 94133, 94110]),
(latitude:REAL, Examples: [37.7911, 37.7929, 37.8072]),
(longitude:REAL, Examples: [-122.404, -122.403, -122.419]),
(phone_number:INTEGER, Examples: [14155345060, 14155823535, 14155344645]),
(tax_code:TEXT, Examples: [H24, H01, H25]),
(business_certificate:INTEGER, Examples: [779059, 352312, 346882]),
(application_date:DATE, Examples: [2001-10-10]),
(owner_name:TEXT, Examples: [Tiramisu LLC]),
(owner_address:TEXT, Examples: [33 Belden St]),
(owner_city:TEXT, Examples: [San Francisco, S.F., SAN FRANCISCO]),
(owner_state:TEXT, Examples: [CA, DC, WA]),
(owner_zip:TEXT, Examples: [94104, 94133, 94114])
]
【Foreign keys】
inspections.business_id=businesses.business_id
violations.business_id=businesses.business_id

    【Question】
    How many restaurants' owners are in California? restaurants' owners in California refer to owner_state = 'CA';

    【Evidence】
    restaurants' owners in California refer to owner_state = 'CA';

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

SQL: SELECT COUNT(owner_state) FROM businesses WHERE owner_state = 'CA'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 food_inspection
【Schema】
# Table: inspections
[
(business_id:INTEGER, Examples: [10, 24, 31]),
(score:INTEGER, Examples: [92, 94, 82]),
(date:DATE, Examples: [2014-01-14]),
(type:TEXT, Examples: [Routine - Unscheduled])
]
# Table: violations
[
(business_id:INTEGER, Examples: [10, 24, 31]),
(date:DATE, Examples: [2014-07-29]),
(violation_type_id:TEXT, Examples: [103129, 103144, 103119]),
(risk_category:TEXT, Examples: [Moderate Risk, Low Risk, High Risk]),
(description:TEXT, Examples: [Insufficient hot water or running water])
]
# Table: businesses
[
(business_id:INTEGER, Primary Key, Examples: [10, 24, 31]),
(name:TEXT, Examples: [Tiramisu Kitchen]),
(address:TEXT, Examples: [033 Belden Pl]),
(city:TEXT, Examples: [San Francisco, S.F., SAN FRANCISCO]),
(postal_code:TEXT, Examples: [94104, 94133, 94110]),
(latitude:REAL, Examples: [37.7911, 37.7929, 37.8072]),
(longitude:REAL, Examples: [-122.404, -122.403, -122.419]),
(phone_number:INTEGER, Examples: [14155345060, 14155823535, 14155344645]),
(tax_code:TEXT, Examples: [H24, H01, H25]),
(business_certificate:INTEGER, Examples: [779059, 352312, 346882]),
(application_date:DATE, Examples: [2001-10-10]),
(owner_name:TEXT, Examples: [Tiramisu LLC]),
(owner_address:TEXT, Examples: [33 Belden St]),
(owner_city:TEXT, Examples: [San Francisco, S.F., SAN FRANCISCO]),
(owner_state:TEXT, Examples: [CA, DC, WA]),
(owner_zip:TEXT, Examples: [94104, 94133, 94114])
]
【Foreign keys】
inspections.business_id=businesses.business_id
violations.business_id=businesses.business_id

    【Question】
    How many restaurants have met all requirements in the inspection? met all requirements in the inspection refers to score = 100;

    【Evidence】
    met all requirements in the inspection refers to score = 100;

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

SQL: SELECT COUNT(score) FROM inspections WHERE score = 100
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 food_inspection
【Schema】
# Table: inspections
[
(business_id:INTEGER, Examples: [10, 24, 31]),
(score:INTEGER, Examples: [92, 94, 82]),
(date:DATE, Examples: [2014-01-14]),
(type:TEXT, Examples: [Routine - Unscheduled])
]
# Table: violations
[
(business_id:INTEGER, Examples: [10, 24, 31]),
(date:DATE, Examples: [2014-07-29]),
(violation_type_id:TEXT, Examples: [103129, 103144, 103119]),
(risk_category:TEXT, Examples: [Moderate Risk, Low Risk, High Risk]),
(description:TEXT, Examples: [Insufficient hot water or running water])
]
# Table: businesses
[
(business_id:INTEGER, Primary Key, Examples: [10, 24, 31]),
(name:TEXT, Examples: [Tiramisu Kitchen]),
(address:TEXT, Examples: [033 Belden Pl]),
(city:TEXT, Examples: [San Francisco, S.F., SAN FRANCISCO]),
(postal_code:TEXT, Examples: [94104, 94133, 94110]),
(latitude:REAL, Examples: [37.7911, 37.7929, 37.8072]),
(longitude:REAL, Examples: [-122.404, -122.403, -122.419]),
(phone_number:INTEGER, Examples: [14155345060, 14155823535, 14155344645]),
(tax_code:TEXT, Examples: [H24, H01, H25]),
(business_certificate:INTEGER, Examples: [779059, 352312, 346882]),
(application_date:DATE, Examples: [2001-10-10]),
(owner_name:TEXT, Examples: [Tiramisu LLC]),
(owner_address:TEXT, Examples: [33 Belden St]),
(owner_city:TEXT, Examples: [San Francisco, S.F., SAN FRANCISCO]),
(owner_state:TEXT, Examples: [CA, DC, WA]),
(owner_zip:TEXT, Examples: [94104, 94133, 94114])
]
【Foreign keys】
inspections.business_id=businesses.business_id
violations.business_id=businesses.business_id

    【Question】
    Among the inspections carried out in 2016, how many of them are routine? inspections carried out in 2016 refer to YEAR(date) = 2016; routine inspections refer to type = 'Routine - Unscheduled';

    【Evidence】
    inspections carried out in 2016 refer to YEAR(date) = 2016; routine inspections refer to type = 'Routine - Unscheduled';

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

SQL: SELECT COUNT(`date`) FROM inspections WHERE STRFTIME('%Y', `date`) = '2016' AND type = 'Routine - Unscheduled'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 food_inspection
【Schema】
# Table: inspections
[
(business_id:INTEGER, Examples: [10, 24, 31]),
(score:INTEGER, Examples: [92, 94, 82]),
(date:DATE, Examples: [2014-01-14]),
(type:TEXT, Examples: [Routine - Unscheduled])
]
# Table: violations
[
(business_id:INTEGER, Examples: [10, 24, 31]),
(date:DATE, Examples: [2014-07-29]),
(violation_type_id:TEXT, Examples: [103129, 103144, 103119]),
(risk_category:TEXT, Examples: [Moderate Risk, Low Risk, High Risk]),
(description:TEXT, Examples: [Insufficient hot water or running water])
]
# Table: businesses
[
(business_id:INTEGER, Primary Key, Examples: [10, 24, 31]),
(name:TEXT, Examples: [Tiramisu Kitchen]),
(address:TEXT, Examples: [033 Belden Pl]),
(city:TEXT, Examples: [San Francisco, S.F., SAN FRANCISCO]),
(postal_code:TEXT, Examples: [94104, 94133, 94110]),
(latitude:REAL, Examples: [37.7911, 37.7929, 37.8072]),
(longitude:REAL, Examples: [-122.404, -122.403, -122.419]),
(phone_number:INTEGER, Examples: [14155345060, 14155823535, 14155344645]),
(tax_code:TEXT, Examples: [H24, H01, H25]),
(business_certificate:INTEGER, Examples: [779059, 352312, 346882]),
(application_date:DATE, Examples: [2001-10-10]),
(owner_name:TEXT, Examples: [Tiramisu LLC]),
(owner_address:TEXT, Examples: [33 Belden St]),
(owner_city:TEXT, Examples: [San Francisco, S.F., SAN FRANCISCO]),
(owner_state:TEXT, Examples: [CA, DC, WA]),
(owner_zip:TEXT, Examples: [94104, 94133, 94114])
]
【Foreign keys】
inspections.business_id=businesses.business_id
violations.business_id=businesses.business_id

    【Question】
    Please list the names of all the restaurants that have met all requirements in one inspection. met all requirements refers to inspections where score = 100;

    【Evidence】
    met all requirements refers to inspections where score = 100;

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

SQL: SELECT DISTINCT T2.name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.score = 100
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 food_inspection
【Schema】
# Table: inspections
[
(business_id:INTEGER, Examples: [10, 24, 31]),
(score:INTEGER, Examples: [92, 94, 82]),
(date:DATE, Examples: [2014-01-14]),
(type:TEXT, Examples: [Routine - Unscheduled])
]
# Table: violations
[
(business_id:INTEGER, Examples: [10, 24, 31]),
(date:DATE, Examples: [2014-07-29]),
(violation_type_id:TEXT, Examples: [103129, 103144, 103119]),
(risk_category:TEXT, Examples: [Moderate Risk, Low Risk, High Risk]),
(description:TEXT, Examples: [Insufficient hot water or running water])
]
# Table: businesses
[
(business_id:INTEGER, Primary Key, Examples: [10, 24, 31]),
(name:TEXT, Examples: [Tiramisu Kitchen]),
(address:TEXT, Examples: [033 Belden Pl]),
(city:TEXT, Examples: [San Francisco, S.F., SAN FRANCISCO]),
(postal_code:TEXT, Examples: [94104, 94133, 94110]),
(latitude:REAL, Examples: [37.7911, 37.7929, 37.8072]),
(longitude:REAL, Examples: [-122.404, -122.403, -122.419]),
(phone_number:INTEGER, Examples: [14155345060, 14155823535, 14155344645]),
(tax_code:TEXT, Examples: [H24, H01, H25]),
(business_certificate:INTEGER, Examples: [779059, 352312, 346882]),
(application_date:DATE, Examples: [2001-10-10]),
(owner_name:TEXT, Examples: [Tiramisu LLC]),
(owner_address:TEXT, Examples: [33 Belden St]),
(owner_city:TEXT, Examples: [San Francisco, S.F., SAN FRANCISCO]),
(owner_state:TEXT, Examples: [CA, DC, WA]),
(owner_zip:TEXT, Examples: [94104, 94133, 94114])
]
【Foreign keys】
inspections.business_id=businesses.business_id
violations.business_id=businesses.business_id

    【Question】
    Among the restaurants being inspected in 2016, how many of them are in San Francisco? inspected in 2016 refers to YEAR(date) = 2016; San Francisco refers to city in ('San Francisco', 'SF' ,'S.F.', 'SAN FRANCISCO');

    【Evidence】
    inspected in 2016 refers to YEAR(date) = 2016; San Francisco refers to city in ('San Francisco', 'SF' ,'S.F.', 'SAN FRANCISCO');

    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 T2.business_id) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2016' AND T2.city IN ('San Francisco', 'SAN FRANCISCO', 'SF', 'S.F.')