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】 cookbook
【Schema】
# Table: Quantity
[
(quantity_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(recipe_id:INTEGER, Examples: [214, 215, 216]),
(ingredient_id:INTEGER, Examples: [1613, 3334, 2222]),
(max_qty:REAL, Examples: [2.0, 0.25, 0.5]),
(min_qty:REAL, Examples: [2.0, 0.25, 0.5]),
(unit:TEXT, Examples: [cup(s), teaspoon(s), 14 oz. can(s)]),
(preparation:TEXT, Examples: [melted, or water, divided]),
(optional:TEXT, Examples: [FALSE, TRUE])
]
# Table: Nutrition
[
(recipe_id:INTEGER, Primary Key, Examples: [214, 215, 216]),
(protein:REAL, Examples: [5.47, 5.7, 4.9]),
(carbo:REAL, Examples: [41.29, 23.75, 26.88]),
(alcohol:REAL, Examples: [0.0, 1.93, 2.7]),
(total_fat:REAL, Examples: [11.53, 1.08, 1.1]),
(sat_fat:REAL, Examples: [2.21, 0.58, 0.06]),
(cholestrl:REAL, Examples: [1.39, 3.48, 3.46]),
(sodium:REAL, Examples: [260.78, 46.17, 41.79]),
(iron:REAL, Examples: [0.81, 0.57, 0.37]),
(vitamin_c:REAL, Examples: [8.89, 13.02, 6.13]),
(vitamin_a:REAL, Examples: [586.2, 2738.24, 1521.1]),
(fiber:REAL, Examples: [0.87, 0.62, 0.34]),
(pcnt_cal_carb:REAL, Examples: [56.8, 67.38, 78.45]),
(pcnt_cal_fat:REAL, Examples: [35.68, 6.89, 7.24]),
(pcnt_cal_prot:REAL, Examples: [7.53, 16.17, 14.3]),
(calories:REAL, Examples: [290.79, 141.01, 137.06])
]
# Table: Recipe
[
(recipe_id:INTEGER, Primary Key, Examples: [214, 215, 216]),
(title:TEXT, Examples: [Raspberry Chiffon Pie]),
(subtitle:TEXT, Examples: [with Banana Cream Whip]),
(servings:INTEGER, Examples: [10, 4, 8]),
(yield_unit:TEXT, Examples: [1 pie, 8 tarts, 2 quarts]),
(prep_min:INTEGER, Examples: [20, 5, 10]),
(cook_min:INTEGER, Examples: [8, 2, 13]),
(stnd_min:INTEGER, Examples: [305, 65, 0]),
(source:TEXT, Examples: [The California Tree Fruit Agreement]),
(intro:TEXT),
(directions:TEXT)
]
# Table: Ingredient
[
(ingredient_id:INTEGER, Primary Key, Examples: [1, 6, 10]),
(category:TEXT, Examples: [dairy, Mexican products, cereals]),
(name:TEXT, Examples: [1% lowfat cottage cheese]),
(plural:TEXT, Examples: [s, #NAME?, es])
]
【Foreign keys】
Quantity.recipe_id=Recipe.recipe_id
Quantity.ingredient_id=Ingredient.ingredient_id
Quantity.recipe_id=Nutrition.recipe_id
Nutrition.recipe_id=Recipe.recipe_id

    【Question】
    List all the ingredients of Apricot Yogurt Parfaits. Apricot Yogurt Parfaits refers to title

    【Evidence】
    Apricot Yogurt Parfaits refers to title

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

SQL: SELECT T3.name, T3.category FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T1.title = 'Apricot Yogurt Parfaits'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 cookbook
【Schema】
# Table: Quantity
[
(quantity_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(recipe_id:INTEGER, Examples: [214, 215, 216]),
(ingredient_id:INTEGER, Examples: [1613, 3334, 2222]),
(max_qty:REAL, Examples: [2.0, 0.25, 0.5]),
(min_qty:REAL, Examples: [2.0, 0.25, 0.5]),
(unit:TEXT, Examples: [cup(s), teaspoon(s), 14 oz. can(s)]),
(preparation:TEXT, Examples: [melted, or water, divided]),
(optional:TEXT, Examples: [FALSE, TRUE])
]
# Table: Nutrition
[
(recipe_id:INTEGER, Primary Key, Examples: [214, 215, 216]),
(protein:REAL, Examples: [5.47, 5.7, 4.9]),
(carbo:REAL, Examples: [41.29, 23.75, 26.88]),
(alcohol:REAL, Examples: [0.0, 1.93, 2.7]),
(total_fat:REAL, Examples: [11.53, 1.08, 1.1]),
(sat_fat:REAL, Examples: [2.21, 0.58, 0.06]),
(cholestrl:REAL, Examples: [1.39, 3.48, 3.46]),
(sodium:REAL, Examples: [260.78, 46.17, 41.79]),
(iron:REAL, Examples: [0.81, 0.57, 0.37]),
(vitamin_c:REAL, Examples: [8.89, 13.02, 6.13]),
(vitamin_a:REAL, Examples: [586.2, 2738.24, 1521.1]),
(fiber:REAL, Examples: [0.87, 0.62, 0.34]),
(pcnt_cal_carb:REAL, Examples: [56.8, 67.38, 78.45]),
(pcnt_cal_fat:REAL, Examples: [35.68, 6.89, 7.24]),
(pcnt_cal_prot:REAL, Examples: [7.53, 16.17, 14.3]),
(calories:REAL, Examples: [290.79, 141.01, 137.06])
]
# Table: Recipe
[
(recipe_id:INTEGER, Primary Key, Examples: [214, 215, 216]),
(title:TEXT, Examples: [Raspberry Chiffon Pie]),
(subtitle:TEXT, Examples: [with Banana Cream Whip]),
(servings:INTEGER, Examples: [10, 4, 8]),
(yield_unit:TEXT, Examples: [1 pie, 8 tarts, 2 quarts]),
(prep_min:INTEGER, Examples: [20, 5, 10]),
(cook_min:INTEGER, Examples: [8, 2, 13]),
(stnd_min:INTEGER, Examples: [305, 65, 0]),
(source:TEXT, Examples: [The California Tree Fruit Agreement]),
(intro:TEXT),
(directions:TEXT)
]
# Table: Ingredient
[
(ingredient_id:INTEGER, Primary Key, Examples: [1, 6, 10]),
(category:TEXT, Examples: [dairy, Mexican products, cereals]),
(name:TEXT, Examples: [1% lowfat cottage cheese]),
(plural:TEXT, Examples: [s, #NAME?, es])
]
【Foreign keys】
Quantity.recipe_id=Recipe.recipe_id
Quantity.ingredient_id=Ingredient.ingredient_id
Quantity.recipe_id=Nutrition.recipe_id
Nutrition.recipe_id=Recipe.recipe_id

    【Question】
    Identify recipes with different maximum and minimum quantities. maximum quantities refers to max_qty; minimum quantities refers to max_qty <> min_qty

    【Evidence】
    maximum quantities refers to max_qty; minimum quantities refers to max_qty <> min_qty

    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 Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.max_qty <> T2.min_qty
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 cookbook
【Schema】
# Table: Quantity
[
(quantity_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(recipe_id:INTEGER, Examples: [214, 215, 216]),
(ingredient_id:INTEGER, Examples: [1613, 3334, 2222]),
(max_qty:REAL, Examples: [2.0, 0.25, 0.5]),
(min_qty:REAL, Examples: [2.0, 0.25, 0.5]),
(unit:TEXT, Examples: [cup(s), teaspoon(s), 14 oz. can(s)]),
(preparation:TEXT, Examples: [melted, or water, divided]),
(optional:TEXT, Examples: [FALSE, TRUE])
]
# Table: Nutrition
[
(recipe_id:INTEGER, Primary Key, Examples: [214, 215, 216]),
(protein:REAL, Examples: [5.47, 5.7, 4.9]),
(carbo:REAL, Examples: [41.29, 23.75, 26.88]),
(alcohol:REAL, Examples: [0.0, 1.93, 2.7]),
(total_fat:REAL, Examples: [11.53, 1.08, 1.1]),
(sat_fat:REAL, Examples: [2.21, 0.58, 0.06]),
(cholestrl:REAL, Examples: [1.39, 3.48, 3.46]),
(sodium:REAL, Examples: [260.78, 46.17, 41.79]),
(iron:REAL, Examples: [0.81, 0.57, 0.37]),
(vitamin_c:REAL, Examples: [8.89, 13.02, 6.13]),
(vitamin_a:REAL, Examples: [586.2, 2738.24, 1521.1]),
(fiber:REAL, Examples: [0.87, 0.62, 0.34]),
(pcnt_cal_carb:REAL, Examples: [56.8, 67.38, 78.45]),
(pcnt_cal_fat:REAL, Examples: [35.68, 6.89, 7.24]),
(pcnt_cal_prot:REAL, Examples: [7.53, 16.17, 14.3]),
(calories:REAL, Examples: [290.79, 141.01, 137.06])
]
# Table: Recipe
[
(recipe_id:INTEGER, Primary Key, Examples: [214, 215, 216]),
(title:TEXT, Examples: [Raspberry Chiffon Pie]),
(subtitle:TEXT, Examples: [with Banana Cream Whip]),
(servings:INTEGER, Examples: [10, 4, 8]),
(yield_unit:TEXT, Examples: [1 pie, 8 tarts, 2 quarts]),
(prep_min:INTEGER, Examples: [20, 5, 10]),
(cook_min:INTEGER, Examples: [8, 2, 13]),
(stnd_min:INTEGER, Examples: [305, 65, 0]),
(source:TEXT, Examples: [The California Tree Fruit Agreement]),
(intro:TEXT),
(directions:TEXT)
]
# Table: Ingredient
[
(ingredient_id:INTEGER, Primary Key, Examples: [1, 6, 10]),
(category:TEXT, Examples: [dairy, Mexican products, cereals]),
(name:TEXT, Examples: [1% lowfat cottage cheese]),
(plural:TEXT, Examples: [s, #NAME?, es])
]
【Foreign keys】
Quantity.recipe_id=Recipe.recipe_id
Quantity.ingredient_id=Ingredient.ingredient_id
Quantity.recipe_id=Nutrition.recipe_id
Nutrition.recipe_id=Recipe.recipe_id

    【Question】
    What ingredients does the longest cooking time recipe have? the longest cooking time refers to MAX(cook_min)

    【Evidence】
    the longest cooking time refers to MAX(cook_min)

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

SQL: SELECT T3.name FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id ORDER BY T1.cook_min DESC LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 cookbook
【Schema】
# Table: Quantity
[
(quantity_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(recipe_id:INTEGER, Examples: [214, 215, 216]),
(ingredient_id:INTEGER, Examples: [1613, 3334, 2222]),
(max_qty:REAL, Examples: [2.0, 0.25, 0.5]),
(min_qty:REAL, Examples: [2.0, 0.25, 0.5]),
(unit:TEXT, Examples: [cup(s), teaspoon(s), 14 oz. can(s)]),
(preparation:TEXT, Examples: [melted, or water, divided]),
(optional:TEXT, Examples: [FALSE, TRUE])
]
# Table: Nutrition
[
(recipe_id:INTEGER, Primary Key, Examples: [214, 215, 216]),
(protein:REAL, Examples: [5.47, 5.7, 4.9]),
(carbo:REAL, Examples: [41.29, 23.75, 26.88]),
(alcohol:REAL, Examples: [0.0, 1.93, 2.7]),
(total_fat:REAL, Examples: [11.53, 1.08, 1.1]),
(sat_fat:REAL, Examples: [2.21, 0.58, 0.06]),
(cholestrl:REAL, Examples: [1.39, 3.48, 3.46]),
(sodium:REAL, Examples: [260.78, 46.17, 41.79]),
(iron:REAL, Examples: [0.81, 0.57, 0.37]),
(vitamin_c:REAL, Examples: [8.89, 13.02, 6.13]),
(vitamin_a:REAL, Examples: [586.2, 2738.24, 1521.1]),
(fiber:REAL, Examples: [0.87, 0.62, 0.34]),
(pcnt_cal_carb:REAL, Examples: [56.8, 67.38, 78.45]),
(pcnt_cal_fat:REAL, Examples: [35.68, 6.89, 7.24]),
(pcnt_cal_prot:REAL, Examples: [7.53, 16.17, 14.3]),
(calories:REAL, Examples: [290.79, 141.01, 137.06])
]
# Table: Recipe
[
(recipe_id:INTEGER, Primary Key, Examples: [214, 215, 216]),
(title:TEXT, Examples: [Raspberry Chiffon Pie]),
(subtitle:TEXT, Examples: [with Banana Cream Whip]),
(servings:INTEGER, Examples: [10, 4, 8]),
(yield_unit:TEXT, Examples: [1 pie, 8 tarts, 2 quarts]),
(prep_min:INTEGER, Examples: [20, 5, 10]),
(cook_min:INTEGER, Examples: [8, 2, 13]),
(stnd_min:INTEGER, Examples: [305, 65, 0]),
(source:TEXT, Examples: [The California Tree Fruit Agreement]),
(intro:TEXT),
(directions:TEXT)
]
# Table: Ingredient
[
(ingredient_id:INTEGER, Primary Key, Examples: [1, 6, 10]),
(category:TEXT, Examples: [dairy, Mexican products, cereals]),
(name:TEXT, Examples: [1% lowfat cottage cheese]),
(plural:TEXT, Examples: [s, #NAME?, es])
]
【Foreign keys】
Quantity.recipe_id=Recipe.recipe_id
Quantity.ingredient_id=Ingredient.ingredient_id
Quantity.recipe_id=Nutrition.recipe_id
Nutrition.recipe_id=Recipe.recipe_id

    【Question】
    Calculate the percentage of recipes with no cholesterol included and have a cooking time less than 20 minutes among all recipes. no cholesterol refers to cholestrl = 0; cooking time less than 20 minutes refers to cook_min < 20; calculation = MULTIPLY(DIVIDE(COUNT(cholestrl = 0 THEN recipe_id), COUNT(recipe_id)), 100)

    【Evidence】
    no cholesterol refers to cholestrl = 0; cooking time less than 20 minutes refers to cook_min < 20; calculation = MULTIPLY(DIVIDE(COUNT(cholestrl = 0 THEN recipe_id), COUNT(recipe_id)), 100)

    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.cook_min < 20 AND T2.cholestrl = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 human_resources
【Schema】
# Table: position
[
(positionID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(positiontitle:TEXT, Examples: [Account Representative]),
(educationrequired:TEXT, Examples: [4 year degree, 2 year degree, 6 year degree]),
(minsalary:TEXT, Examples: [US$25,000.00, US$50,000.00, US$18,000.00]),
(maxsalary:TEXT, Examples: [US$75,000.00, US$150,000.00, US$25,000.00])
]
# Table: location
[
(locationID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(locationcity:TEXT, Examples: [Atlanta, Boston, Chicago]),
(address:TEXT, Examples: [450 Peachtree Rd, 3 Commons Blvd, 500 Loop Highway]),
(state:TEXT, Examples: [GA, MA, IL]),
(zipcode:INTEGER, Examples: [30316, 2190, 60620]),
(officephone:TEXT, Examples: [(404)333-5555, (617)123-4444, (312)444-6666])
]
# Table: employee
[
(ssn:TEXT, Primary Key, Examples: [000-01-0000, 000-02-2222, 109-87-6543]),
(lastname:TEXT, Examples: [Milgrom, Adams, Wood]),
(firstname:TEXT, Examples: [Patricia, Sandy, Emily]),
(hiredate:TEXT, Examples: [10/1/04, 1/15/01, 3/12/97]),
(salary:TEXT, Examples: [US$57,500.00, US$19,500.00, US$69,000.00]),
(gender:TEXT, Examples: [F, M]),
(performance:TEXT, Examples: [Average, Good, Poor]),
(positionID:INTEGER, Examples: [2, 3, 1]),
(locationID:INTEGER, Examples: [2, 1, 5])
]
【Foreign keys】
employee.locationID=location.locationID
employee.positionID=position.positionID

    【Question】
    Which employee has the highest salary? Please give his or her full name. the highest salary refers to MAX(salary); full name = firstname, lastname

    【Evidence】
    the highest salary refers to MAX(salary); full name = firstname, lastname

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

SQL: SELECT firstname, lastname FROM employee ORDER BY salary DESC LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 human_resources
【Schema】
# Table: position
[
(positionID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(positiontitle:TEXT, Examples: [Account Representative]),
(educationrequired:TEXT, Examples: [4 year degree, 2 year degree, 6 year degree]),
(minsalary:TEXT, Examples: [US$25,000.00, US$50,000.00, US$18,000.00]),
(maxsalary:TEXT, Examples: [US$75,000.00, US$150,000.00, US$25,000.00])
]
# Table: location
[
(locationID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(locationcity:TEXT, Examples: [Atlanta, Boston, Chicago]),
(address:TEXT, Examples: [450 Peachtree Rd, 3 Commons Blvd, 500 Loop Highway]),
(state:TEXT, Examples: [GA, MA, IL]),
(zipcode:INTEGER, Examples: [30316, 2190, 60620]),
(officephone:TEXT, Examples: [(404)333-5555, (617)123-4444, (312)444-6666])
]
# Table: employee
[
(ssn:TEXT, Primary Key, Examples: [000-01-0000, 000-02-2222, 109-87-6543]),
(lastname:TEXT, Examples: [Milgrom, Adams, Wood]),
(firstname:TEXT, Examples: [Patricia, Sandy, Emily]),
(hiredate:TEXT, Examples: [10/1/04, 1/15/01, 3/12/97]),
(salary:TEXT, Examples: [US$57,500.00, US$19,500.00, US$69,000.00]),
(gender:TEXT, Examples: [F, M]),
(performance:TEXT, Examples: [Average, Good, Poor]),
(positionID:INTEGER, Examples: [2, 3, 1]),
(locationID:INTEGER, Examples: [2, 1, 5])
]
【Foreign keys】
employee.locationID=location.locationID
employee.positionID=position.positionID

    【Question】
    How many emplyees have a good job performance? good job performance refers to performance = 'Good'

    【Evidence】
    good job performance refers to performance = 'Good'

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

SQL: SELECT COUNT(*) FROM employee WHERE performance = 'Good'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 human_resources
【Schema】
# Table: position
[
(positionID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(positiontitle:TEXT, Examples: [Account Representative]),
(educationrequired:TEXT, Examples: [4 year degree, 2 year degree, 6 year degree]),
(minsalary:TEXT, Examples: [US$25,000.00, US$50,000.00, US$18,000.00]),
(maxsalary:TEXT, Examples: [US$75,000.00, US$150,000.00, US$25,000.00])
]
# Table: location
[
(locationID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(locationcity:TEXT, Examples: [Atlanta, Boston, Chicago]),
(address:TEXT, Examples: [450 Peachtree Rd, 3 Commons Blvd, 500 Loop Highway]),
(state:TEXT, Examples: [GA, MA, IL]),
(zipcode:INTEGER, Examples: [30316, 2190, 60620]),
(officephone:TEXT, Examples: [(404)333-5555, (617)123-4444, (312)444-6666])
]
# Table: employee
[
(ssn:TEXT, Primary Key, Examples: [000-01-0000, 000-02-2222, 109-87-6543]),
(lastname:TEXT, Examples: [Milgrom, Adams, Wood]),
(firstname:TEXT, Examples: [Patricia, Sandy, Emily]),
(hiredate:TEXT, Examples: [10/1/04, 1/15/01, 3/12/97]),
(salary:TEXT, Examples: [US$57,500.00, US$19,500.00, US$69,000.00]),
(gender:TEXT, Examples: [F, M]),
(performance:TEXT, Examples: [Average, Good, Poor]),
(positionID:INTEGER, Examples: [2, 3, 1]),
(locationID:INTEGER, Examples: [2, 1, 5])
]
【Foreign keys】
employee.locationID=location.locationID
employee.positionID=position.positionID

    【Question】
    Please list the social security numbers of the male employees with a salary of over $70,000 a year. social security numbers refers to ssn; male employees refers to gender = 'M'; salary of over $70,000 a year refers to salary > '70000'

    【Evidence】
    social security numbers refers to ssn; male employees refers to gender = 'M'; salary of over $70,000 a year refers to salary > '70000'

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

SQL: SELECT ssn FROM employee WHERE gender = 'M' AND CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL) > 70000
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 human_resources
【Schema】
# Table: position
[
(positionID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(positiontitle:TEXT, Examples: [Account Representative]),
(educationrequired:TEXT, Examples: [4 year degree, 2 year degree, 6 year degree]),
(minsalary:TEXT, Examples: [US$25,000.00, US$50,000.00, US$18,000.00]),
(maxsalary:TEXT, Examples: [US$75,000.00, US$150,000.00, US$25,000.00])
]
# Table: location
[
(locationID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(locationcity:TEXT, Examples: [Atlanta, Boston, Chicago]),
(address:TEXT, Examples: [450 Peachtree Rd, 3 Commons Blvd, 500 Loop Highway]),
(state:TEXT, Examples: [GA, MA, IL]),
(zipcode:INTEGER, Examples: [30316, 2190, 60620]),
(officephone:TEXT, Examples: [(404)333-5555, (617)123-4444, (312)444-6666])
]
# Table: employee
[
(ssn:TEXT, Primary Key, Examples: [000-01-0000, 000-02-2222, 109-87-6543]),
(lastname:TEXT, Examples: [Milgrom, Adams, Wood]),
(firstname:TEXT, Examples: [Patricia, Sandy, Emily]),
(hiredate:TEXT, Examples: [10/1/04, 1/15/01, 3/12/97]),
(salary:TEXT, Examples: [US$57,500.00, US$19,500.00, US$69,000.00]),
(gender:TEXT, Examples: [F, M]),
(performance:TEXT, Examples: [Average, Good, Poor]),
(positionID:INTEGER, Examples: [2, 3, 1]),
(locationID:INTEGER, Examples: [2, 1, 5])
]
【Foreign keys】
employee.locationID=location.locationID
employee.positionID=position.positionID

    【Question】
    What is the required education for the position of regional manager? required education refers to educationrequired; position of regional manager refers to  positiontitle = 'Regional Manager'

    【Evidence】
    required education refers to educationrequired; position of regional manager refers to  positiontitle = 'Regional Manager'

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

SQL: SELECT educationrequired FROM position WHERE positiontitle = 'Regional Manager'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 human_resources
【Schema】
# Table: position
[
(positionID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(positiontitle:TEXT, Examples: [Account Representative]),
(educationrequired:TEXT, Examples: [4 year degree, 2 year degree, 6 year degree]),
(minsalary:TEXT, Examples: [US$25,000.00, US$50,000.00, US$18,000.00]),
(maxsalary:TEXT, Examples: [US$75,000.00, US$150,000.00, US$25,000.00])
]
# Table: location
[
(locationID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(locationcity:TEXT, Examples: [Atlanta, Boston, Chicago]),
(address:TEXT, Examples: [450 Peachtree Rd, 3 Commons Blvd, 500 Loop Highway]),
(state:TEXT, Examples: [GA, MA, IL]),
(zipcode:INTEGER, Examples: [30316, 2190, 60620]),
(officephone:TEXT, Examples: [(404)333-5555, (617)123-4444, (312)444-6666])
]
# Table: employee
[
(ssn:TEXT, Primary Key, Examples: [000-01-0000, 000-02-2222, 109-87-6543]),
(lastname:TEXT, Examples: [Milgrom, Adams, Wood]),
(firstname:TEXT, Examples: [Patricia, Sandy, Emily]),
(hiredate:TEXT, Examples: [10/1/04, 1/15/01, 3/12/97]),
(salary:TEXT, Examples: [US$57,500.00, US$19,500.00, US$69,000.00]),
(gender:TEXT, Examples: [F, M]),
(performance:TEXT, Examples: [Average, Good, Poor]),
(positionID:INTEGER, Examples: [2, 3, 1]),
(locationID:INTEGER, Examples: [2, 1, 5])
]
【Foreign keys】
employee.locationID=location.locationID
employee.positionID=position.positionID

    【Question】
    Which position has a lower minimum salary, Account Representative or Trainee? position of Account Representative refers to positiontitle = 'Account Representative'; position of Trainee refers to positiontitle = 'Trainee'; lower minimum salary refers to MIN(minsalary)

    【Evidence】
    position of Account Representative refers to positiontitle = 'Account Representative'; position of Trainee refers to positiontitle = 'Trainee'; lower minimum salary refers to MIN(minsalary)

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

SQL: SELECT positiontitle FROM position WHERE positiontitle = 'Account Representative' OR positiontitle = 'Trainee' ORDER BY minsalary ASC LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 human_resources
【Schema】
# Table: position
[
(positionID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(positiontitle:TEXT, Examples: [Account Representative]),
(educationrequired:TEXT, Examples: [4 year degree, 2 year degree, 6 year degree]),
(minsalary:TEXT, Examples: [US$25,000.00, US$50,000.00, US$18,000.00]),
(maxsalary:TEXT, Examples: [US$75,000.00, US$150,000.00, US$25,000.00])
]
# Table: location
[
(locationID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(locationcity:TEXT, Examples: [Atlanta, Boston, Chicago]),
(address:TEXT, Examples: [450 Peachtree Rd, 3 Commons Blvd, 500 Loop Highway]),
(state:TEXT, Examples: [GA, MA, IL]),
(zipcode:INTEGER, Examples: [30316, 2190, 60620]),
(officephone:TEXT, Examples: [(404)333-5555, (617)123-4444, (312)444-6666])
]
# Table: employee
[
(ssn:TEXT, Primary Key, Examples: [000-01-0000, 000-02-2222, 109-87-6543]),
(lastname:TEXT, Examples: [Milgrom, Adams, Wood]),
(firstname:TEXT, Examples: [Patricia, Sandy, Emily]),
(hiredate:TEXT, Examples: [10/1/04, 1/15/01, 3/12/97]),
(salary:TEXT, Examples: [US$57,500.00, US$19,500.00, US$69,000.00]),
(gender:TEXT, Examples: [F, M]),
(performance:TEXT, Examples: [Average, Good, Poor]),
(positionID:INTEGER, Examples: [2, 3, 1]),
(locationID:INTEGER, Examples: [2, 1, 5])
]
【Foreign keys】
employee.locationID=location.locationID
employee.positionID=position.positionID

    【Question】
    In which city's office does Sandy Adams work at? Sandy Adams is the fullname of an employee; full name = firstname, lastname; city refers to locationcity

    【Evidence】
    Sandy Adams is the fullname of an employee; full name = firstname, lastname; city refers to locationcity

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

SQL: SELECT T2.locationcity FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T1.lastname = 'Adams' AND T1.firstname = 'Sandy'