Chinastark/bird_dataset huggingface dataset:
Database: cookbook
Question: How many ingredients are there in the recipe that is best in helping your body's natural defence against illness and infection?
Evidence: best in helping your body's natural defence against illness and infection refers to MAX(vitamin_a);
SQL: SELECT COUNT(*) FROM Nutrition AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.vitamin_a > 0
Database: cookbook
Question: What are the names of the top 5 recipes that are best for wound healing?
Evidence: names of the recipes refers to title; best for wound healing refers to MAX(vitamin_c)
SQL: SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id ORDER BY T2.vitamin_c DESC LIMIT 5
Database: cookbook
Question: Which ingredient appeared the least in recipes?
Evidence: ingredient appeared the least in recipes refers to MIN(ingredient_id)
SQL: SELECT T1.name FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id GROUP BY T2.ingredient_id ORDER BY COUNT(T2.ingredient_id) ASC LIMIT 1
Database: cookbook
Question: How many baking product ingredients are there in the No-Bake Chocolate Cheesecake?
Evidence: baking product is a category; No-Bake Chocolate Cheesecake refers to title;
SQL: SELECT COUNT(*) 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 T3.category = 'baking products' AND T1.title = 'No-Bake Chocolate Cheesecake'
Database: cookbook
Question: List all the ingredients for Strawberry Sorbet.
Evidence: Strawberry Sorbet refers to title
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 WHERE T1.title = 'Strawberry Sorbet'
Database: cookbook
Question: What are the optional ingredients for Warm Chinese Chicken Salad?
Evidence: optional refers to optional = 'TRUE'; Warm Chinese Chicken Salad refers to title
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 WHERE T1.title = 'Warm Chinese Chicken Salad' AND T2.optional = 'TRUE'
Database: cookbook
Question: Among the recipes with alcohol content over 10, which recipe takes the longest to prepare?
Evidence: with alcohol content over 10 refers to alcohol > 10; takes the longest to prepare refers to MAX(prep_min)
SQL: SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.alcohol > 10 ORDER BY T1.prep_min DESC LIMIT 1
Database: cookbook
Question: How many servings does the recipe with the highest unsaturated fat have?
Evidence: with the highest unsaturated fat refers MAX(SUBTRACT(total_fat, sat_fat))
SQL: SELECT COUNT(T1.title) FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id ORDER BY T2.total_fat - T2.sat_fat DESC LIMIT 1
Database: cookbook
Question: Among the recipes whose source is the National Potato Board, which recipe has the highest calories?
Evidence: the National Potato Board is a source; the highest calories refers to MAX(calories)
SQL: SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.source = 'National Potato Board' ORDER BY T2.calories DESC LIMIT 1
Database: cookbook
Question: Which recipe has the highest number of ingredients? Calculate the said recipe's total time of cooking.
Evidence: the highest number of ingredients refers to MAX(ingredient_id); total time refers to recipe_id, total time of cooking refers to TOTAL(prep_min, cook_min, stnd_min)
SQL: SELECT T2.recipe_id, T1.prep_min + T1.cook_min + T1.stnd_min FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id GROUP BY T2.recipe_id ORDER BY COUNT(T2.ingredient_id) DESC LIMIT 1
Database: cookbook
Question: Which ingredient appeared the most in recipes? Calculate its amount of appearance in percentage.
Evidence: ingredient appeared the most in recipes refers to MAX(COUNT(ingredient_id)); calculation = MULTIPLY(DIVIDE(COUNT(MAX(ingredient_id)), COUNT(ingredient_id)), 100)
SQL: SELECT T1.name, CAST(COUNT(T2.ingredient_id) AS FLOAT) * 100 / ( SELECT COUNT(T2.ingredient_id) FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T2.ingredient_id = T1.ingredient_id ) AS "percentage" FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T2.ingredient_id = T1.ingredient_id GROUP BY T2.ingredient_id ORDER BY COUNT(T2.ingredient_id) DESC LIMIT 1
Database: cookbook
Question: Provide the title and total time of the recipe which has the highest possibility of gaining weight.
Evidence: the highest possibility of gaining weight refers to MAX(total_fat); total time refers to recipe_id, total time refers to TOTAL(prep_min, cook_min, stnd_min)
SQL: SELECT T1.title, T1.prep_min + T1.cook_min + T1.stnd_min FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id ORDER BY T2.total_fat DESC LIMIT 1
Database: cookbook
Question: Which recipes contain almond extract?
Evidence: almond extract is a name of an ingredient
SQL: SELECT T1.title 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 T3.name = 'almond extract'
Database: cookbook
Question: List the ingredients in Tomato-Cucumber Relish.
Evidence: Tomato-Cucumber Relish refers to title
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 WHERE T1.title = 'Tomato-Cucumber Relish'
Database: cookbook
Question: How many ingredients are needed to prepare Idaho Potato Supreme?
Evidence: Idaho Potato Supreme refers to title
SQL: SELECT COUNT(*) FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Idaho Potato Supreme'
Database: cookbook
Question: Provide the ingredients that are rationed in the recipe with the highest carbohydrate content.
Evidence: the highest carbohydrate content refers to MAX(carbo)
SQL: SELECT T1.name FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id INNER JOIN Nutrition AS T3 ON T3.recipe_id = T2.recipe_id WHERE T2.max_qty = T2.min_qty ORDER BY T3.carbo DESC LIMIT 1
Database: cookbook
Question: Name the recipes which can lead to constipation.
Evidence: can lead to constipation refers to iron > 20
SQL: SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.iron > 20
Database: cookbook
Question: Describe the ingredients in the recipe with the highest vitamin that helps vision in dim light.
Evidence: the highest vitamin that helps vision in dim light refers to MAX(vitamin_a)
SQL: SELECT T1.name FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id INNER JOIN Nutrition AS T3 ON T3.recipe_id = T2.recipe_id ORDER BY T3.vitamin_a DESC LIMIT 1
Database: cookbook
Question: Provide the ingredients and maximum quantities of the recipe which can serve 7 people.
Evidence: can serve 7 people refers to servings = 7
SQL: SELECT T3.name, T2.max_qty 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.servings = 7
Database: cookbook
Question: Among the recipes from The California Tree Fruit Agreement, calculate the percentage of sodium-free recipes.
Evidence: The California Tree Fruit Agreement is a source; calculation = MULTIPLY(DIVIDE(COUNT(sodium BETWEEN 0 AND 5 THEN recipe_id), COUNT(recipe_id)), 100)
SQL: SELECT CAST(SUM(CASE WHEN T2.sodium < 5 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 WHERE T1.source = 'The California Tree Fruit Agreement'
Database: cookbook
Question: List the ingredients which measure in slices.
Evidence: slices refers to unit = 'slice(s)'
SQL: SELECT T1.name FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id WHERE T2.unit = 'slice(s)'
Database: cookbook
Question: How many recipes can be made with canned dairy?
Evidence: canned dairy is a category
SQL: SELECT COUNT(*) FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id WHERE T1.category = 'canned dairy'
Database: cookbook
Question: Provide the title and total time of the recipe which can be made with only lima beans.
Evidence: total time refers to total time refers to TOTAL(prep_min, cook_min, stnd_min); lima beans is a name of an ingredient
SQL: SELECT T1.title, T1.prep_min + T1.cook_min + T1.stnd_min 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 T3.name = 'lima beans'
Database: cookbook
Question: Among the recipes with sea bass, how many percent of recipes can serve 10 people and above?
Evidence: sea bass is a name of an ingredient; can serve 10 people and above refers to servings > = 10; calculation = MULTIPLY(DIVIDE(COUNT(servings > = 10 THEN recipe_id)), COUNT(recipe_id), 100)
SQL: SELECT CAST(SUM(CASE WHEN T1.servings >= 10 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) 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 T3.name = 'sea bass steak'
Database: cookbook
Question: How much fat does the Raspberry Chiffon Pie have?
Evidence: Raspberry Chiffon Pie refers to title
SQL: SELECT T2.total_fat FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Raspberry Chiffon Pie'
Database: cookbook
Question: What is the percentage calories protein of Raspberry Chiffon Pie?
Evidence: Raspberry Chiffon Pie refers title; percentage calories protein refers to pcnt_cal_prot
SQL: SELECT pcnt_cal_prot FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Raspberry Chiffon Pie'
Database: cookbook
Question: How many ingredients are required to make the Raspberry Chiffon Pie?
Evidence: Raspberry Chiffon Pie refer to title
SQL: SELECT COUNT(*) 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 = 'Raspberry Chiffon Pie'
Database: cookbook
Question: List the names of alcohol free recipes.
Evidence: alcohol free refers to alcohol = 0
SQL: SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.alcohol = 0
Database: cookbook
Question: What is the average vitamin C amount of all cakes?
Evidence: average vitamin C refers to AVG(vitamin_c); all cakes refers to title LIKE '%cake%'
SQL: SELECT AVG(T1.vitamin_c) FROM Nutrition AS T1 INNER JOIN Recipe AS T2 ON T2.recipe_id = T1.recipe_id WHERE T2.title LIKE '%cake%'
Database: cookbook
Question: How many dairy recipes can serve more than 10 people?
Evidence: dairy recipes refers to category = 'dairy'; serve more than 10 people refers to servings > 10
SQL: SELECT COUNT(*) 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 T3.category = 'dairy' AND T1.servings > 10
Database: cookbook
Question: List the names of recipes that can lead to constipation.
Evidence: lead to constipation refers to iron > 20
SQL: SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.iron > 20
Database: cookbook
Question: Which recipe has the highest calories?
Evidence: the highest calories refers to MAX(calories)
SQL: SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id ORDER BY T2.calories DESC LIMIT 1
Database: cookbook
Question: How many recipes are non-dairy?
Evidence: non-dairy refers to category NOT LIKE '%dairy"
SQL: SELECT COUNT(T2.recipe_id) FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T2.ingredient_id = T1.ingredient_id INNER JOIN Nutrition AS T3 ON T3.recipe_id = T2.recipe_id WHERE T1.category NOT LIKE '%dairy%'
Database: cookbook
Question: List all the ingredients of Apricot Yogurt Parfaits.
Evidence: Apricot Yogurt Parfaits refers to title
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'
Database: cookbook
Question: Identify recipes with different maximum and minimum quantities.
Evidence: maximum quantities refers to max_qty; minimum quantities refers to max_qty <> min_qty
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
Database: cookbook
Question: What ingredients does the longest cooking time recipe have?
Evidence: the longest cooking time refers to MAX(cook_min)
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
Database: cookbook
Question: Calculate the percentage of recipes with no cholesterol included and have a cooking time less than 20 minutes among all recipes.
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)
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
Database: cookbook
Question: Among all recipes containing cheese, what is the percentage of recipes with calories greater than 200?
Evidence: cheese is a category; calories greater than 200 refers to calories > 200; calculation = MULTIPLY(DIVIDE(COUNT(calories > 200 THEN recipe_id), COUNT(recipe_id)), 100)
SQL: SELECT CAST(SUM(CASE WHEN T4.calories > 200 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) 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 INNER JOIN Nutrition AS T4 ON T4.recipe_id = T1.recipe_id WHERE T3.category = 'cheese'
Database: human_resources
Question: Which employee has the highest salary? Please give his or her full name.
Evidence: the highest salary refers to MAX(salary); full name = firstname, lastname
SQL: SELECT firstname, lastname FROM employee ORDER BY salary DESC LIMIT 1
Database: human_resources
Question: How many emplyees have a good job performance?
Evidence: good job performance refers to performance = 'Good'
SQL: SELECT COUNT(*) FROM employee WHERE performance = 'Good'
Database: human_resources
Question: Please list the social security numbers of the male employees with a salary of over $70,000 a year.
Evidence: social security numbers refers to ssn; male employees refers to gender = 'M'; salary of over $70,000 a year refers to salary > '70000'
SQL: SELECT ssn FROM employee WHERE gender = 'M' AND CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL) > 70000
Database: human_resources
Question: What is the required education for the position of regional manager?
Evidence: required education refers to educationrequired; position of regional manager refers to  positiontitle = 'Regional Manager'
SQL: SELECT educationrequired FROM position WHERE positiontitle = 'Regional Manager'
Database: human_resources
Question: Which position has a lower minimum salary, Account Representative or Trainee?
Evidence: position of Account Representative refers to positiontitle = 'Account Representative'; position of Trainee refers to positiontitle = 'Trainee'; lower minimum salary refers to MIN(minsalary)
SQL: SELECT positiontitle FROM position WHERE positiontitle = 'Account Representative' OR positiontitle = 'Trainee' ORDER BY minsalary ASC LIMIT 1
Database: human_resources
Question: In which city's office does Sandy Adams work at?
Evidence: Sandy Adams is the fullname of an employee; full name = firstname, lastname; city refers to locationcity
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'
Database: human_resources
Question: Among the employees working at the office in New York, how many of them have a good job performance?
Evidence: Sandy Adams is the fullname of an employee; full name = firstname, lastname; New York refers to state = 'NY'; good job performance refers to performance = 'Good';
SQL: SELECT COUNT(*) FROM employee AS T1 INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T2.state = 'NY' AND T1.performance = 'Good'
Database: human_resources
Question: What is the office phone number of the location at which Sandy Adams works?
Evidence: Sandy Adams is the fullname of an employee; full name = firstname, lastname;
SQL: SELECT T2.officephone FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T1.lastname = 'Adams' AND T1.firstname = 'Sandy'
Database: human_resources
Question: How many male employees work at the address 450 Peachtree Rd?
Evidence: male employees refers to gender = 'M'
SQL: SELECT COUNT(*) FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T2.address = '450 Peachtree Rd' AND T1.gender = 'M'
Database: human_resources
Question: How many employees work as an Account Representative?
Evidence: work as an Account Representative refers to positiontitle = 'Account Representative'
SQL: SELECT COUNT(*) FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Account Representative'
Database: human_resources
Question: How much higher is James Johnson's salary from the minimum salary of his title?
Evidence: James Johnson is the fullname of an employee; full name = firstname, lastname; minimum salary refers to minsalary; calculation = SUBTRACT(salary, minsalary)
SQL: SELECT CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL) - CAST(REPLACE(SUBSTR(T2.minsalary, 4), ',', '') AS REAL) AS diff FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T1.lastname = 'Johnson' AND T1.firstname = 'James'
Database: human_resources
Question: Among the employees who are Trainees, how many of them work in New York?
Evidence: Trainees is a position title; California refers to state = 'NY'
SQL: SELECT COUNT(*) FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID INNER JOIN position AS T3  ON T3.positionID = T1.positionID WHERE T3.positiontitle = 'Trainee' AND T2.state = 'NY'
Database: human_resources
Question: Please list the full names of the employees who are working as a Trainee.
Evidence: full name = firstname, lastname; trainees is a position title
SQL: SELECT T1.firstname, T1.lastname FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Trainee'
Database: human_resources
Question: Which employee's job position requires a higher education level, Jose Rodriguez or Sandy Adams?
Evidence: Jose Rodriguez AND Sandy Adams are the fullname of employee; full name = firstname, lastname; higher education level refers to MAX(educationrequired)
SQL: SELECT T1.firstname, T1.lastname FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE (T1.lastname = 'Adams' AND T1.firstname = 'Sandy') OR (T1.lastname = 'Rodriguez' AND T1.firstname = 'Jose') ORDER BY T2.educationrequired DESC LIMIT 1
Database: human_resources
Question: Please list the zip codes of the offices where all the male employees with a good job performance work at.
Evidence: male employees refers to gender = 'M'; good job performance refers to performance = 'Good'
SQL: SELECT T2.zipcode FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T1.gender = 'M' AND T1.performance = 'Good'
Database: human_resources
Question: Please list the social security numbers of all the employees who work in California.
Evidence: social security numbers refers to ssn; California refers to state = 'CA'
SQL: SELECT T1.ssn FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T2.state = 'CA'
Database: human_resources
Question: Among the employees who work as a Trainee, how many of them have a salary of over &20,000 a year?
Evidence: Trainee is a position title; salary of over 20,000 refers to salary > '20000'
SQL: SELECT COUNT(*) FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL) > 20000 AND T2.positiontitle = 'Trainee'
Database: human_resources
Question: What is the average salary of the employees who work as a Trainee?
Evidence: average = DIVIDE( SUM(salary), COUNT(positiontitle) where positiontitle = 'Trainee'; Trainee is a position title
SQL: SELECT AVG(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) AS avg FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Trainee'
Database: human_resources
Question: By what percentage is the average salary of Trainees higher than the minimum salary of this postion?
Evidence: AVG(salary); Trainee is a position title; minimum salary refers to minsalary; calculation = DIVIDE(SUBTRACT(AVG(salary), minsalary), minsalary) * 100
SQL: SELECT 100 * (AVG(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) - CAST(REPLACE(SUBSTR(T2.minsalary, 4), ',', '') AS REAL)) / CAST(REPLACE(SUBSTR(T2.minsalary, 4), ',', '') AS REAL) AS per FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Trainee'
Database: human_resources
Question: Give the number of female employees.
Evidence: number of female employees means COUNT(gender = 'F')
SQL: SELECT COUNT(*) FROM employee WHERE gender = 'F'
Database: human_resources
Question: State the name of the city where Jose Rodriguez works.
Evidence: Jose Rodriguez is the fullname of an employee; full name = firstname, lastname; name of city refers to locationcity
SQL: SELECT T2.locationcity FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T1.firstname = 'Jose' AND T1.lastname = 'Rodriguez'
Database: human_resources
Question: In which state does Emily Wood work?
Evidence: Emily Wood is the full name of an employee; full name = firstname, lastname;
SQL: SELECT T2.state FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T1.firstname = 'Emily' AND T1.lastname = 'Wood'
Database: human_resources
Question: What is the education required for David Whitehead to reach his current position?
Evidence: David Whitehead is the full name of an employee; full name = firstname, lastname
SQL: SELECT T2.educationrequired FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T1.firstname = 'David' AND T1.lastname = 'Whitehead' AND T1.gender = 'M'
Database: human_resources
Question: How many employees are there in the "Miami" office?
Evidence: Miami office refers to locationcity = 'Miami'
SQL: SELECT COUNT(*) FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T2.locationcity = 'Miami'
Database: human_resources
Question: Who is the highest paid employee in "Boston"? Give the full name.
Evidence: Boston refers to locationcity = 'Boston'; the highest paid employee refers to MAX(salary); full name = firstname, lastname
SQL: SELECT T1.firstname, T1.lastname FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T2.locationcity = 'Boston' ORDER BY T1.salary DESC LIMIT 1
Database: human_resources
Question: Who is the employee in “New York City” with a good performance? Give the social security number of the employee.
Evidence: New York City refers to locationcity = 'New York City'; good performance refers to performance = 'Good'; social security number refers to ssn
SQL: SELECT T1.firstname, T1.lastname, T1.ssn FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T2.locationcity = 'New York City' AND T1.performance = 'Good'