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】 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】
    Who is the owner of the business that has a high risk violation of 103109 and described as unclean or unsanitary food contact surfaces? owner refers to owner_name; high risk violation of 103109 and described as unclean or unsanitary food contact surfaces refers to risk_category = 'High Risk' where violation_type_id = 103109 and description = 'Unclean or unsanitary food contact surfaces';

    【Evidence】
    owner refers to owner_name; high risk violation of 103109 and described as unclean or unsanitary food contact surfaces refers to risk_category = 'High Risk' where violation_type_id = 103109 and description = 'Unclean or unsanitary food contact surfaces';

    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.owner_name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.risk_category = 'High Risk' AND T1.violation_type_id = 103109 AND T1.description = 'Unclean or unsanitary food contact surfaces'
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 owners from Cameron Park, what is the business name of the business with a score of 100? Cameron Park is a name of city;

    【Evidence】
    Cameron Park is a name of city;

    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 T2.owner_city = 'Cameron Park' AND 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】
    List the violation type ID of business with business ID from 30 to 50 and located at 747 IRVING St, San Francisco. business ID from 30 to 50 refers to business_id between 30 and 50; address = '747 IRVING St'; city = 'San Francisco';

    【Evidence】
    business ID from 30 to 50 refers to business_id between 30 and 50; address = '747 IRVING St'; city = '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 DISTINCT T1.violation_type_id FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.business_id BETWEEN 30 AND 50 AND T2.address = '747 IRVING St' AND T2.city = 'San Francisco'
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】
    What is the owner's name of the of the business that violates 103156 on June 12, 2014? business that violates 103156 on June 12, 2014 refers to business_id where violation_type_id = 103156 and date = '2014-06-12';

    【Evidence】
    business that violates 103156 on June 12, 2014 refers to business_id where violation_type_id = 103156 and date = '2014-06-12';

    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.owner_name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.violation_type_id = 103156 AND T1.`date` = '2014-06-12'
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】
    In businesses with an owner address 500 California St, 2nd Floor of Silicon Valley, list the type of inspection of the business with the highest score. the highest score MAX(score); Silicon Valley is located in 'SAN FRANCISCO';

    【Evidence】
    the highest score MAX(score); Silicon Valley is located in '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 T1.type FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.owner_address = '500 California St, 2nd Floor' AND T2.owner_city = 'SAN FRANCISCO' ORDER BY T1.score DESC LIMIT 1
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 violations in 2016, how many of them have unscheduled inspections? unscheduled inspections refer to type = 'Routine - Unschedule'; year(date) = 2016;

    【Evidence】
    unscheduled inspections refer to type = 'Routine - Unschedule'; year(date) = 2016;

    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.business_id) FROM violations AS T1 INNER JOIN inspections AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2016' AND T2.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】
    List the business' name and risk category of businesses with a score greater than the 80% of average score of all businesses. score greater than the 80% of average score of all businesses refers to score > MULTIPLY(0.8, avg(score) from inspections);

    【Evidence】
    score greater than the 80% of average score of all businesses refers to score > MULTIPLY(0.8, avg(score) from inspections);

    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.name, T3.risk_category FROM businesses AS T1 INNER JOIN inspections AS T2 ON T1.business_id = T2.business_id INNER JOIN violations AS T3 ON T1.business_id = T3.business_id WHERE T2.score > 0.8 * ( SELECT AVG(score) FROM inspections )
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】
    In businesses with a score lower than 95 and located around the postal code of 94110, what is the percentage of businesses with a risk category of low risk? DIVIDE(COUNT(business_id where risk_category = 'Low Risk', score < 95 and postal_code = 94110), COUNT(business_id where score < 95 and postal_code = 94110)) as percentage;

    【Evidence】
    DIVIDE(COUNT(business_id where risk_category = 'Low Risk', score < 95 and postal_code = 94110), COUNT(business_id where score < 95 and postal_code = 94110)) as percentage;

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

SQL: SELECT CAST(SUM(CASE WHEN T1.risk_category = 'Low Risk' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.risk_category) FROM violations AS T1 INNER JOIN inspections AS T2 ON T1.business_id = T2.business_id INNER JOIN businesses AS T3 ON T2.business_id = T3.business_id WHERE T2.score < 95 AND T3.postal_code = 94110
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 craftbeer
【Schema】
# Table: beers
[
(id:INTEGER, Primary Key, Examples: [2687, 2688, 2689]),
(brewery_id:INTEGER, Examples: [0, 1, 2]),
(abv:REAL, Examples: [0.065, 0.087, 0.08]),
(ibu:REAL, Examples: [65.0, 85.0, 35.0]),
(name:TEXT, Examples: [Dale's Pale Ale, Gordon Ale (2009), Old Chub]),
(style:TEXT, Examples: [American Pale Ale (APA)]),
(ounces:REAL, Examples: [12.0, 16.0, 24.0])
]
# Table: breweries
[
(id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(name:TEXT, Examples: [NorthGate Brewing ]),
(city:TEXT, Examples: [Minneapolis, Louisville, Framingham]),
(state:TEXT, Examples: [MN, KY, MA])
]
【Foreign keys】
beers.brewery_id=breweries.id

    【Question】
    Which distinct state makes beer that has the least amount of bitterness?

    【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 T2.state, T1.ibu FROM beers AS T1 INNER JOIN breweries AS T2 ON T1.brewery_id = T2.id WHERE T1.ibu IS NOT NULL AND T1.ibu = ( SELECT MIN(ibu) FROM beers )
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 craftbeer
【Schema】
# Table: beers
[
(id:INTEGER, Primary Key, Examples: [2687, 2688, 2689]),
(brewery_id:INTEGER, Examples: [0, 1, 2]),
(abv:REAL, Examples: [0.065, 0.087, 0.08]),
(ibu:REAL, Examples: [65.0, 85.0, 35.0]),
(name:TEXT, Examples: [Dale's Pale Ale, Gordon Ale (2009), Old Chub]),
(style:TEXT, Examples: [American Pale Ale (APA)]),
(ounces:REAL, Examples: [12.0, 16.0, 24.0])
]
# Table: breweries
[
(id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(name:TEXT, Examples: [NorthGate Brewing ]),
(city:TEXT, Examples: [Minneapolis, Louisville, Framingham]),
(state:TEXT, Examples: [MN, KY, MA])
]
【Foreign keys】
beers.brewery_id=breweries.id

    【Question】
    Where in New York can you locate the brewery that makes the bitterest beer? List both the brewery's name and the name of the city. The more IBU, the more bitter the beer is, bitterest means highest IBU.

    【Evidence】
    The more IBU, the more bitter the beer is, bitterest means highest IBU.

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

SQL: SELECT T2.name, T2.city FROM beers AS T1 INNER JOIN breweries AS T2 ON T1.brewery_id = T2.id WHERE T2.state = 'NY' ORDER BY T1.ibu DESC LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 craftbeer
【Schema】
# Table: beers
[
(id:INTEGER, Primary Key, Examples: [2687, 2688, 2689]),
(brewery_id:INTEGER, Examples: [0, 1, 2]),
(abv:REAL, Examples: [0.065, 0.087, 0.08]),
(ibu:REAL, Examples: [65.0, 85.0, 35.0]),
(name:TEXT, Examples: [Dale's Pale Ale, Gordon Ale (2009), Old Chub]),
(style:TEXT, Examples: [American Pale Ale (APA)]),
(ounces:REAL, Examples: [12.0, 16.0, 24.0])
]
# Table: breweries
[
(id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(name:TEXT, Examples: [NorthGate Brewing ]),
(city:TEXT, Examples: [Minneapolis, Louisville, Framingham]),
(state:TEXT, Examples: [MN, KY, MA])
]
【Foreign keys】
beers.brewery_id=breweries.id

    【Question】
    What is the average alcohol content per 12-ounce beer bottle produced by Boston Beer Company?

    【Evidence】
    

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

SQL: SELECT AVG(T1.abv) FROM beers AS T1 INNER JOIN breweries AS T2 ON T1.brewery_id = T2.id WHERE T2.name = 'Boston Beer Company' AND T1.ounces = 12