id
int64
0
9.43k
db_id
stringclasses
69 values
schema
stringclasses
69 values
question
stringlengths
24
325
output
stringlengths
23
804
evidence
stringlengths
0
673
filtered_schema
listlengths
0
16
8,900
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
How many servings does the recipe with the highest unsaturated fat have?
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
with the highest unsaturated fat refers MAX(SUBTRACT(total_fat, sat_fat))
[ "Nutrition.recipe_id", "Nutrition.sat_fat", "Nutrition.total_fat", "Recipe.recipe_id", "Recipe.title" ]
8,901
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
Among the recipes whose source is the National Potato Board, which recipe has the highest calories?
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
the National Potato Board is a source; the highest calories refers to MAX(calories)
[ "Nutrition.calories", "Nutrition.recipe_id", "Recipe.recipe_id", "Recipe.source", "Recipe.title" ]
8,902
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
Which recipe has the highest number of ingredients? Calculate the said recipe's total time of cooking.
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
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)
[ "Quantity.ingredient_id", "Quantity.recipe_id", "Recipe.cook_min", "Recipe.prep_min", "Recipe.recipe_id", "Recipe.stnd_min" ]
8,903
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
Which ingredient appeared the most in recipes? Calculate its amount of appearance in percentage.
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 ...
ingredient appeared the most in recipes refers to MAX(COUNT(ingredient_id)); calculation = MULTIPLY(DIVIDE(COUNT(MAX(ingredient_id)), COUNT(ingredient_id)), 100)
[ "Ingredient.ingredient_id", "Ingredient.name", "Quantity.ingredient_id" ]
8,904
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
Provide the title and total time of the recipe which has the highest possibility of gaining weight.
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
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)
[ "Nutrition.recipe_id", "Nutrition.total_fat", "Recipe.cook_min", "Recipe.prep_min", "Recipe.recipe_id", "Recipe.stnd_min", "Recipe.title" ]
8,905
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
Which recipes contain almond extract?
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'
almond extract is a name of an ingredient
[ "Ingredient.ingredient_id", "Ingredient.name", "Quantity.ingredient_id", "Quantity.recipe_id", "Recipe.recipe_id", "Recipe.title" ]
8,906
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
List the ingredients in Tomato-Cucumber Relish.
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'
Tomato-Cucumber Relish refers to title
[ "Ingredient.ingredient_id", "Ingredient.name", "Quantity.ingredient_id", "Quantity.recipe_id", "Recipe.recipe_id", "Recipe.title" ]
8,907
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
How many ingredients are needed to prepare Idaho Potato Supreme?
SELECT COUNT(*) FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Idaho Potato Supreme'
Idaho Potato Supreme refers to title
[ "Quantity.recipe_id", "Recipe.recipe_id", "Recipe.title" ]
8,908
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
Provide the ingredients that are rationed in the recipe with the highest carbohydrate content.
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
the highest carbohydrate content refers to MAX(carbo)
[ "Ingredient.ingredient_id", "Ingredient.name", "Nutrition.carbo", "Nutrition.recipe_id", "Quantity.ingredient_id", "Quantity.max_qty", "Quantity.min_qty", "Quantity.recipe_id" ]
8,909
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
Name the recipes which can lead to constipation.
SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.iron > 20
can lead to constipation refers to iron > 20
[ "Nutrition.iron", "Nutrition.recipe_id", "Recipe.recipe_id", "Recipe.title" ]
8,910
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
Describe the ingredients in the recipe with the highest vitamin that helps vision in dim light.
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
the highest vitamin that helps vision in dim light refers to MAX(vitamin_a)
[ "Ingredient.ingredient_id", "Ingredient.name", "Nutrition.recipe_id", "Nutrition.vitamin_a", "Quantity.ingredient_id", "Quantity.recipe_id" ]
8,911
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
Provide the ingredients and maximum quantities of the recipe which can serve 7 people.
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
can serve 7 people refers to servings = 7
[ "Ingredient.ingredient_id", "Ingredient.name", "Quantity.ingredient_id", "Quantity.max_qty", "Quantity.recipe_id", "Recipe.recipe_id", "Recipe.servings" ]
8,912
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
Among the recipes from The California Tree Fruit Agreement, calculate the percentage of sodium-free recipes.
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'
The California Tree Fruit Agreement is a source; calculation = MULTIPLY(DIVIDE(COUNT(sodium BETWEEN 0 AND 5 THEN recipe_id), COUNT(recipe_id)), 100)
[ "Nutrition.recipe_id", "Nutrition.sodium", "Recipe.recipe_id", "Recipe.source" ]
8,913
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
List the ingredients which measure in slices.
SELECT T1.name FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id WHERE T2.unit = 'slice(s)'
slices refers to unit = 'slice(s)'
[ "Ingredient.ingredient_id", "Ingredient.name", "Quantity.ingredient_id", "Quantity.unit" ]
8,914
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
How many recipes can be made with canned dairy?
SELECT COUNT(*) FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id WHERE T1.category = 'canned dairy'
canned dairy is a category
[ "Ingredient.category", "Ingredient.ingredient_id", "Quantity.ingredient_id" ]
8,915
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
Provide the title and total time of the recipe which can be made with only lima beans.
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'
total time refers to total time refers to TOTAL(prep_min, cook_min, stnd_min); lima beans is a name of an ingredient
[ "Ingredient.ingredient_id", "Ingredient.name", "Quantity.ingredient_id", "Quantity.recipe_id", "Recipe.cook_min", "Recipe.prep_min", "Recipe.recipe_id", "Recipe.stnd_min", "Recipe.title" ]
8,916
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
Among the recipes with sea bass, how many percent of recipes can serve 10 people and above?
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'
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)
[ "Ingredient.ingredient_id", "Ingredient.name", "Quantity.ingredient_id", "Quantity.recipe_id", "Recipe.recipe_id", "Recipe.servings" ]
8,917
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
How much fat does the Raspberry Chiffon Pie have?
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'
Raspberry Chiffon Pie refers to title
[ "Nutrition.recipe_id", "Nutrition.total_fat", "Recipe.recipe_id", "Recipe.title" ]
8,918
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
What is the percentage calories protein of Raspberry Chiffon Pie?
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'
Raspberry Chiffon Pie refers title; percentage calories protein refers to pcnt_cal_prot
[ "Nutrition.recipe_id", "Recipe.recipe_id", "Recipe.title" ]
8,919
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
How many ingredients are required to make the Raspberry Chiffon Pie?
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'
Raspberry Chiffon Pie refer to title
[ "Ingredient.ingredient_id", "Quantity.ingredient_id", "Quantity.recipe_id", "Recipe.recipe_id", "Recipe.title" ]
8,920
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
List the names of alcohol free recipes.
SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.alcohol = 0
alcohol free refers to alcohol = 0
[ "Nutrition.alcohol", "Nutrition.recipe_id", "Recipe.recipe_id", "Recipe.title" ]
8,921
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
What is the average vitamin C amount of all cakes?
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%'
average vitamin C refers to AVG(vitamin_c); all cakes refers to title LIKE '%cake%'
[ "Nutrition.recipe_id", "Nutrition.vitamin_c", "Recipe.recipe_id", "Recipe.title" ]
8,922
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
How many dairy recipes can serve more than 10 people?
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
dairy recipes refers to category = 'dairy'; serve more than 10 people refers to servings > 10
[ "Ingredient.category", "Ingredient.ingredient_id", "Quantity.ingredient_id", "Quantity.recipe_id", "Recipe.recipe_id", "Recipe.servings" ]
8,923
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
List the names of recipes that can lead to constipation.
SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.iron > 20
lead to constipation refers to iron > 20
[ "Nutrition.iron", "Nutrition.recipe_id", "Recipe.recipe_id", "Recipe.title" ]
8,924
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
Which recipe has the highest calories?
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
the highest calories refers to MAX(calories)
[ "Nutrition.calories", "Nutrition.recipe_id", "Recipe.recipe_id", "Recipe.title" ]
8,925
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
How many recipes are non-dairy?
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%'
non-dairy refers to category NOT LIKE '%dairy"
[ "Ingredient.category", "Ingredient.ingredient_id", "Nutrition.recipe_id", "Quantity.ingredient_id", "Quantity.recipe_id" ]
8,926
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
List all the ingredients of Apricot Yogurt Parfaits.
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'
Apricot Yogurt Parfaits refers to title
[ "Ingredient.category", "Ingredient.ingredient_id", "Ingredient.name", "Quantity.ingredient_id", "Quantity.recipe_id", "Recipe.recipe_id", "Recipe.title" ]
8,927
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
Identify recipes with different maximum and minimum quantities.
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
maximum quantities refers to max_qty; minimum quantities refers to max_qty <> min_qty
[ "Quantity.max_qty", "Quantity.min_qty", "Quantity.recipe_id", "Recipe.recipe_id", "Recipe.title" ]
8,928
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
What ingredients does the longest cooking time recipe have?
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
the longest cooking time refers to MAX(cook_min)
[ "Ingredient.ingredient_id", "Ingredient.name", "Quantity.ingredient_id", "Quantity.recipe_id", "Recipe.cook_min", "Recipe.recipe_id" ]
8,929
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
Calculate the percentage of recipes with no cholesterol included and have a cooking time less than 20 minutes among all recipes.
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
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)
[ "Nutrition.cholestrl", "Nutrition.recipe_id", "Recipe.cook_min", "Recipe.recipe_id" ]
8,930
cookbook
CREATE TABLE Ingredient ( ingredient_id INTEGER primary key, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER primary key, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_mi...
Among all recipes containing cheese, what is the percentage of recipes with calories greater than 200?
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'
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)
[ "Ingredient.category", "Ingredient.ingredient_id", "Nutrition.calories", "Nutrition.recipe_id", "Quantity.ingredient_id", "Quantity.recipe_id", "Recipe.recipe_id" ]
8,931
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Which employee has the highest salary? Please give his or her full name.
SELECT firstname, lastname FROM employee ORDER BY salary DESC LIMIT 1
the highest salary refers to MAX(salary); full name = firstname, lastname
[ "employee.firstname", "employee.lastname", "employee.salary" ]
8,932
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
How many emplyees have a good job performance?
SELECT COUNT(*) FROM employee WHERE performance = 'Good'
good job performance refers to performance = 'Good'
[ "employee.performance" ]
8,933
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Please list the social security numbers of the male employees with a salary of over $70,000 a year.
SELECT ssn FROM employee WHERE gender = 'M' AND CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL) > 70000
social security numbers refers to ssn; male employees refers to gender = 'M'; salary of over $70,000 a year refers to salary > '70000'
[ "employee.gender", "employee.salary", "employee.ssn" ]
8,934
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
What is the required education for the position of regional manager?
SELECT educationrequired FROM position WHERE positiontitle = 'Regional Manager'
required education refers to educationrequired; position of regional manager refers to  positiontitle = 'Regional Manager'
[ "position.educationrequired", "position.positiontitle" ]
8,935
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Which position has a lower minimum salary, Account Representative or Trainee?
SELECT positiontitle FROM position WHERE positiontitle = 'Account Representative' OR positiontitle = 'Trainee' ORDER BY minsalary ASC LIMIT 1
position of Account Representative refers to positiontitle = 'Account Representative'; position of Trainee refers to positiontitle = 'Trainee'; lower minimum salary refers to MIN(minsalary)
[ "position.minsalary", "position.positiontitle" ]
8,936
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
In which city's office does Sandy Adams work at?
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'
Sandy Adams is the fullname of an employee; full name = firstname, lastname; city refers to locationcity
[ "employee.firstname", "employee.lastname", "employee.locationID", "location.locationID", "location.locationcity" ]
8,937
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Among the employees working at the office in New York, how many of them have a good job performance?
SELECT COUNT(*) FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T2.state = 'NY' AND T1.performance = 'Good'
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';
[ "employee.locationID", "employee.performance", "location.locationID", "location.state" ]
8,938
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
What is the office phone number of the location at which Sandy Adams works?
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'
Sandy Adams is the fullname of an employee; full name = firstname, lastname;
[ "employee.firstname", "employee.lastname", "employee.locationID", "location.locationID", "location.officephone" ]
8,939
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
How many male employees work at the address 450 Peachtree Rd?
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'
male employees refers to gender = 'M'
[ "employee.gender", "employee.locationID", "location.address", "location.locationID" ]
8,940
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
How many employees work as an Account Representative?
SELECT COUNT(*) FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Account Representative'
work as an Account Representative refers to positiontitle = 'Account Representative'
[ "employee.positionID", "position.positionID", "position.positiontitle" ]
8,941
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
How much higher is James Johnson's salary from the minimum salary of his title?
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'
James Johnson is the fullname of an employee; full name = firstname, lastname; minimum salary refers to minsalary; calculation = SUBTRACT(salary, minsalary)
[ "employee.firstname", "employee.lastname", "employee.positionID", "employee.salary", "position.minsalary", "position.positionID" ]
8,942
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Among the employees who are Trainees, how many of them work in New York?
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'
Trainees is a position title; California refers to state = 'NY'
[ "employee.locationID", "employee.positionID", "location.locationID", "location.state", "position.positionID", "position.positiontitle" ]
8,943
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Please list the full names of the employees who are working as a Trainee.
SELECT T1.firstname, T1.lastname FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Trainee'
full name = firstname, lastname; trainees is a position title
[ "employee.firstname", "employee.lastname", "employee.positionID", "position.positionID", "position.positiontitle" ]
8,944
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Which employee's job position requires a higher education level, Jose Rodriguez or Sandy Adams?
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
Jose Rodriguez AND Sandy Adams are the fullname of employee; full name = firstname, lastname; higher education level refers to MAX(educationrequired)
[ "employee.firstname", "employee.lastname", "employee.positionID", "position.educationrequired", "position.positionID" ]
8,945
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Please list the zip codes of the offices where all the male employees with a good job performance work at.
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'
male employees refers to gender = 'M'; good job performance refers to performance = 'Good'
[ "employee.gender", "employee.locationID", "employee.performance", "location.locationID", "location.zipcode" ]
8,946
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Please list the social security numbers of all the employees who work in California.
SELECT T1.ssn FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T2.state = 'CA'
social security numbers refers to ssn; California refers to state = 'CA'
[ "employee.locationID", "employee.ssn", "location.locationID", "location.state" ]
8,947
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Among the employees who work as a Trainee, how many of them have a salary of over &20,000 a year?
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'
Trainee is a position title; salary of over 20,000 refers to salary > '20000'
[ "employee.positionID", "employee.salary", "position.positionID", "position.positiontitle" ]
8,948
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
What is the average salary of the employees who work as a Trainee?
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'
average = DIVIDE( SUM(salary), COUNT(positiontitle) where positiontitle = 'Trainee'; Trainee is a position title
[ "employee.positionID", "employee.salary", "position.positionID", "position.positiontitle" ]
8,949
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
By what percentage is the average salary of Trainees higher than the minimum salary of this postion?
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'
AVG(salary); Trainee is a position title; minimum salary refers to minsalary; calculation = DIVIDE(SUBTRACT(AVG(salary), minsalary), minsalary) * 100
[ "employee.positionID", "employee.salary", "position.minsalary", "position.positionID", "position.positiontitle" ]
8,950
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Give the number of female employees.
SELECT COUNT(*) FROM employee WHERE gender = 'F'
number of female employees means COUNT(gender = 'F')
[ "employee.gender" ]
8,951
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
State the name of the city where Jose Rodriguez works.
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'
Jose Rodriguez is the fullname of an employee; full name = firstname, lastname; name of city refers to locationcity
[ "employee.firstname", "employee.lastname", "employee.locationID", "location.locationID", "location.locationcity" ]
8,952
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
In which state does Emily Wood work?
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'
Emily Wood is the full name of an employee; full name = firstname, lastname;
[ "employee.firstname", "employee.lastname", "employee.locationID", "location.locationID", "location.state" ]
8,953
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
What is the education required for David Whitehead to reach his current position?
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'
David Whitehead is the full name of an employee; full name = firstname, lastname
[ "employee.firstname", "employee.gender", "employee.lastname", "employee.positionID", "position.educationrequired", "position.positionID" ]
8,954
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
How many employees are there in the "Miami" office?
SELECT COUNT(*) FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T2.locationcity = 'Miami'
Miami office refers to locationcity = 'Miami'
[ "employee.locationID", "location.locationID", "location.locationcity" ]
8,955
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Who is the highest paid employee in "Boston"? Give the full name.
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
Boston refers to locationcity = 'Boston'; the highest paid employee refers to MAX(salary); full name = firstname, lastname
[ "employee.firstname", "employee.lastname", "employee.locationID", "employee.salary", "location.locationID", "location.locationcity" ]
8,956
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Who is the employee in “New York City” with a good performance? Give the social security number of the employee.
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'
New York City refers to locationcity = 'New York City'; good performance refers to performance = 'Good'; social security number refers to ssn
[ "employee.firstname", "employee.lastname", "employee.locationID", "employee.performance", "employee.ssn", "location.locationID", "location.locationcity" ]
8,957
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
How many "account representatives" are there in Chicago with a good performance?
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 = 'Account Representative' AND T2.locationcity = 'Chicago' AND T1.performance = 'Good'
account representatives is a position title; Chicago refers to locationcity = 'Chicago'; good performance refers to performance = 'Good'
[ "employee.locationID", "employee.performance", "employee.positionID", "location.locationID", "location.locationcity", "position.positionID", "position.positiontitle" ]
8,958
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
What is Kenneth Charles's position title?
SELECT T2.positiontitle FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T1.firstname = 'Kenneth' AND T1.lastname = 'Charles'
Kenneth Charles is the full name of an employee; full name = firstname, lastname
[ "employee.firstname", "employee.lastname", "employee.positionID", "position.positionID", "position.positiontitle" ]
8,959
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Give the full address of the office of the highest paid manager.
SELECT T2.address 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 = 'Manager' ORDER BY T1.salary DESC LIMIT 1
the highest paid refers to MAX(salary); manager is a position title
[ "employee.locationID", "employee.positionID", "employee.salary", "location.address", "location.locationID", "position.positionID", "position.positiontitle" ]
8,960
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
What is the max salary for 'Tracy Coulter' if he/she stays on his/her position?
SELECT T2.maxsalary FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T1.firstname = 'Tracy' AND T1.lastname = 'Coulter'
Tracy Coulter is the full name of an employee; full name = firstname, lastname
[ "employee.firstname", "employee.lastname", "employee.positionID", "position.maxsalary", "position.positionID" ]
8,961
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
If Jose Rodriguez tried his best, how many percentage can his salary raise without changing his position?
SELECT 100 * (CAST(REPLACE(SUBSTR(T2.maxsalary, 4), ',', '') AS REAL) - CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) / CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL) AS per FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T1.firstname = 'Jose' AND T1.lastname = 'Rodr...
Jose Rodriguez is the full name of an employee; full name = firstname, lastname; calculation = DIVIDE(SUBTRACT(maxsalary, salary), salary) * 100
[ "employee.firstname", "employee.lastname", "employee.positionID", "employee.salary", "position.maxsalary", "position.positionID" ]
8,962
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
How many employees whose performance is poor have a salary of over $50,000 per year?
SELECT COUNT(*) FROM employee WHERE performance = 'Poor' AND CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL) > 50000
performance is poor refers to performance = 'Poor'; salary of over $50,000 refers to salary > '50000'
[ "employee.performance", "employee.salary" ]
8,963
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Who is the employee with the highest salary? Specify his/her full name.
SELECT firstname, lastname FROM employee WHERE CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL) = ( SELECT MAX(CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL)) FROM employee )
the highest salary refers to MAX(salary); full name = firstname, lastname
[ "employee.firstname", "employee.lastname", "employee.salary" ]
8,964
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
How many positions have a maximum salary of no more than US$1000,000?
SELECT COUNT(*) FROM position WHERE CAST(REPLACE(SUBSTR(maxsalary, 4), ',', '') AS REAL) < 100000
maximum salary of no more than US$1000,000 refers to maxsalary < '100000';
[ "position.maxsalary" ]
8,965
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
How much is the salary of the first ever employee that was hired?
SELECT salary FROM employee ORDER BY hiredate ASC LIMIT 1
first-ever employee that was hired refers to MIN(hiredate)
[ "employee.hiredate", "employee.salary" ]
8,966
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
How much is the minimum salary given to the position with the most complex work?
SELECT minsalary FROM position ORDER BY educationrequired DESC LIMIT 1
most complex work refers to MAX(educationrequired); minimum salary refers to minsalary
[ "position.educationrequired", "position.minsalary" ]
8,967
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
What is the full office location address where most of the employees work at?
SELECT T2.address, T2.locationcity, T2.state, T2.zipcode FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID GROUP BY T2.address, T2.locationcity, T2.state, T2.zipcode ORDER BY COUNT(*) DESC LIMIT 1
full office location address = address, locationcity, state, zipcode; location where most employees work at refers to MAX(locationID)
[ "employee.locationID", "location.address", "location.locationID", "location.locationcity", "location.state", "location.zipcode" ]
8,968
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
What is the average salary of all employees with a 2 year degree position?
SELECT AVG(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T2.educationrequired = '2 year degree'
2 year degree refers to educationrequired = '2 year degree'; calculation = DIVIDE(SUM(salary), COUNT(positiontitle))
[ "employee.positionID", "employee.salary", "position.educationrequired", "position.positionID" ]
8,969
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
How many male Regional Managers are there?
SELECT COUNT(*) FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Regional Manager' AND T1.gender = 'M'
male refers to gender = 'M'; Regional Managers is a position title
[ "employee.gender", "employee.positionID", "position.positionID", "position.positiontitle" ]
8,970
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Which position has the highest amount of poor performing employees?
SELECT T2.positiontitle FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T1.performance = 'Poor' GROUP BY T2.positiontitle ORDER BY COUNT(T2.positiontitle) DESC LIMIT 1
poor performing employees refers to performance = 'Poor'; the highest amount of employees refers to MAX(positiontitle)
[ "employee.performance", "employee.positionID", "position.positionID", "position.positiontitle" ]
8,971
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Which position has the highest number of female employees with a 2 year degree?
SELECT T2.positiontitle FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T2.educationrequired = '2 year degree' AND T1.gender = 'F' GROUP BY T2.positiontitle ORDER BY COUNT(T2.positiontitle) DESC LIMIT 1
2 year degree refers to educationrequired = '2 year degree'; female refers to gender = 'F'; the highest number of employees refers to MAX(positionID)
[ "employee.gender", "employee.positionID", "position.educationrequired", "position.positionID", "position.positiontitle" ]
8,972
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
How many Account Representatives are there in Illinois with satisfying performance?
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 = 'Account Representative' AND T1.performance = 'Good' AND T2.state = 'IL'
Account Representatives is a position title; satisfying performance mostly refers togood performance
[ "employee.locationID", "employee.performance", "employee.positionID", "location.locationID", "location.state", "position.positionID", "position.positiontitle" ]
8,973
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
What is the average salary of the worst performing managers?
SELECT AVG(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T1.performance = 'Poor' AND T2.positiontitle = 'Manager'
the worst performing refers to performance = 'Poor'; manager is a positiontitle; average salary refers to AVG(salary)
[ "employee.performance", "employee.positionID", "employee.salary", "position.positionID", "position.positiontitle" ]
8,974
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
In which state can you find the highest amount of good performing Account Representatives?
SELECT T2.state 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 = 'Account Representative' AND T1.performance = 'Good' GROUP BY T2.state ORDER BY COUNT(T2.state) DESC LIMIT 1
good performing refers to performance = 'Good'; Account Representatives is a positiontitle; highest amount of employee refers to MAX(positionID);
[ "employee.locationID", "employee.performance", "employee.positionID", "location.locationID", "location.state", "position.positionID", "position.positiontitle" ]
8,975
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Mention the employee's full name and performance status who got the lowest in salary per year.
SELECT firstname, lastname, performance FROM employee ORDER BY salary ASC LIMIT 1
full name = firstname, lastname; the lowest salary refers to MIN(salary)
[ "employee.firstname", "employee.lastname", "employee.performance", "employee.salary" ]
8,976
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
List the location cities in the Western states.
SELECT locationcity FROM location WHERE state IN ('CO', 'UT', 'CA')
Western states refers to state = 'CO' OR state = 'UT' OR state = 'CA'; location cities refers to locationcity
[ "location.locationcity", "location.state" ]
8,977
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Which city and address has zip code of above 90000?
SELECT locationcity, address FROM location WHERE zipcode > 90000
zip code of above 90000 refers to zipcode > 90000; city refers to locationcity
[ "location.address", "location.locationcity", "location.zipcode" ]
8,978
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Which positions are suitable with 4 years degree education?
SELECT positiontitle FROM position WHERE educationrequired = '4 year degree'
4 years degree education refers to educationrequired = '4 year degree'; positions refers to positiontitle
[ "position.educationrequired", "position.positiontitle" ]
8,979
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
What is the maximum salary of position "Trainer"?
SELECT maxsalary FROM position WHERE positiontitle = 'Trainee'
maximum salary refers to maxsalary; Trainee is a positiontitle
[ "position.maxsalary", "position.positiontitle" ]
8,980
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
List the full name and social security number of the account representative with average performance.
SELECT T1.firstname, T1.lastname, T1.ssn FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T1.performance = 'Average'
full name = firstname, lastname; social security number refers to ssn; account representative is a position title; average performance refers to performance = 'Average'
[ "employee.firstname", "employee.lastname", "employee.performance", "employee.positionID", "employee.ssn", "position.positionID" ]
8,981
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
When was Emily Wood hired? Mention her position and salary.
SELECT T1.hiredate, T2.positiontitle, T1.salary FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T1.firstname = 'Emily' AND T1.lastname = 'Wood'
Emily Wood is the full name of an employee; full name = firstname, lastname; when was she hired refers to hiredate
[ "employee.firstname", "employee.hiredate", "employee.lastname", "employee.positionID", "employee.salary", "position.positionID", "position.positiontitle" ]
8,982
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
What are the maximum and minimum salary range and position title of Bill Marlin?
SELECT T2.maxsalary, T2.minsalary, T2.positiontitle FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T1.firstname = 'Bill' AND T1.lastname = 'Marlin'
Bill Marlin is the full name of an employee; full name = firstname, lastname; maximum salary refers to maxsalary; minimum salary refers to minsalary
[ "employee.firstname", "employee.lastname", "employee.positionID", "position.maxsalary", "position.minsalary", "position.positionID", "position.positiontitle" ]
8,983
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
List the full names, gender and positions who's location is in New York city.
SELECT T1.firstname, T1.lastname, T1.gender, T3.positiontitle 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 T2.locationcity = 'New York City'
full name = firstname, lastname; New York city refers to locationcity = 'New York City'
[ "employee.firstname", "employee.gender", "employee.lastname", "employee.locationID", "employee.positionID", "location.locationID", "location.locationcity", "position.positionID", "position.positiontitle" ]
8,984
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Mention the full name, hired date and performance status of the employee whose location is in Utah state.
SELECT T1.firstname, T1.lastname, T1.hiredate, T1.performance FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T2.state = 'UT'
full name = firstname, lastname; Utah refers to state = 'UT'
[ "employee.firstname", "employee.hiredate", "employee.lastname", "employee.locationID", "employee.performance", "location.locationID", "location.state" ]
8,985
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Among the employees with poor performance, provide the managers' full names, location city, address and its zip code.
SELECT T1.firstname, T1.lastname, T2.locationcity, T2.address, T2.zipcode 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 = 'Manager' AND T1.performance = 'Poor'
poor performance refers to performance = 'Poor'; full name = firstname, lastname; managers is a position title
[ "employee.firstname", "employee.lastname", "employee.locationID", "employee.performance", "employee.positionID", "location.address", "location.locationID", "location.locationcity", "location.zipcode", "position.positionID", "position.positiontitle" ]
8,986
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
What is the education required to be account representative? Mention account representative full name and salary who got poor in performance status.
SELECT T2.educationrequired, T1.firstname, T1.lastname, T1.salary FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T1.performance = 'Poor' AND T2.positiontitle = 'Account Representative'
account representative is a position title; full name = firstname, lastname; poor performance refers to performance = 'Poor'
[ "employee.firstname", "employee.lastname", "employee.performance", "employee.positionID", "employee.salary", "position.educationrequired", "position.positionID", "position.positiontitle" ]
8,987
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Write down the full name, performance status and located city of the employee who's social security number is "767-74-7373".
SELECT T1.firstname, T1.lastname, T2.state, T2.locationcity FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T1.ssn = '767-74-7373'
full name = firstname, lastname; ssn = '767-74-7373'
[ "employee.firstname", "employee.lastname", "employee.locationID", "employee.ssn", "location.locationID", "location.locationcity", "location.state" ]
8,988
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Describe the employees' full name, positions, located city and office phone number within Colorado state.
SELECT T1.firstname, T1.lastname, T3.positiontitle, T2.locationcity, T2.officephone 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 T2.state = 'CO'
full name = firstname, lastname; Colorado state refers to state = 'CO'; positions refers to positiontitle; located city refers to locationcity; office phone number refers to officephone;
[ "employee.firstname", "employee.lastname", "employee.locationID", "employee.positionID", "location.locationID", "location.locationcity", "location.officephone", "location.state", "position.positionID", "position.positiontitle" ]
8,989
human_resources
CREATE TABLE location ( locationID INTEGER constraint location_pk primary key, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER constraint position_pk ...
Calculate the monthly average salary of the employee with highest salary. Mention his name, position title and location city.
SELECT SUM(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) / 12 AS avg, T1.firstname, T1.lastname , T2.positiontitle, T3.locationcity FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID INNER JOIN location AS T3 ON T1.locationID = T3.locationID WHERE CAST(REPLACE(SUBSTR(T1.salary, 4)...
highest salary refers to MAX(salary); name = firstname, lastname; calculation = DIVIDE(MAX(salary), 12)
[ "employee.firstname", "employee.lastname", "employee.locationID", "employee.positionID", "employee.salary", "location.locationID", "location.locationcity", "position.positionID", "position.positiontitle" ]
8,990
bike_share_1
CREATE TABLE "station" ( id INTEGER not null primary key, name TEXT, lat REAL, long REAL, dock_count INTEGER, city TEXT, installation_date TEXT ); CREATE TABLE "status" ( station_id INTEGER, bike...
Which trip had the longest duration? State the start and end station.
SELECT start_station_name, end_station_name FROM trip WHERE duration = ( SELECT MAX(duration) FROM trip )
start station refers to start_station_name; end station refers to end_station_name;
[ "trip.duration", "trip.end_station_name", "trip.start_station_name" ]
8,991
bike_share_1
CREATE TABLE "station" ( id INTEGER not null primary key, name TEXT, lat REAL, long REAL, dock_count INTEGER, city TEXT, installation_date TEXT ); CREATE TABLE "status" ( station_id INTEGER, bike...
What is the percentage of the trip were done by a subscriber?
SELECT CAST(COUNT(subscription_type) AS REAL) * 100 / ( SELECT COUNT(subscription_type) FROM trip ) FROM trip WHERE subscription_type = 'Subscriber'
subscription_type = 'Subscriber'; DIVIDE(COUNT(id where subscription_type = 'Subscriber'), COUNT(id)) as percentage;
[ "trip.subscription_type" ]
8,992
bike_share_1
CREATE TABLE "station" ( id INTEGER not null primary key, name TEXT, lat REAL, long REAL, dock_count INTEGER, city TEXT, installation_date TEXT ); CREATE TABLE "status" ( station_id INTEGER, bike...
State the final station of bike id 13. Which city was it at?
SELECT T2.end_station_id, T1.city FROM station AS T1 INNER JOIN trip AS T2 ON T1.name = T2.end_station_name WHERE T2.bike_id = 13 ORDER BY T2.end_date DESC LIMIT 1
final station refers to end_station_name where MAX(end_date);
[ "station.city", "station.name", "trip.bike_id", "trip.end_date", "trip.end_station_id", "trip.end_station_name" ]
8,993
bike_share_1
CREATE TABLE "station" ( id INTEGER not null primary key, name TEXT, lat REAL, long REAL, dock_count INTEGER, city TEXT, installation_date TEXT ); CREATE TABLE "status" ( station_id INTEGER, bike...
Name all the trips where the bike was borrowed and returned on a different day. State the city where the bike was returned.
SELECT DISTINCT T1.city FROM station AS T1 INNER JOIN trip AS T2 ON T2.start_station_name = T1.name WHERE SUBSTR(CAST(T2.start_date AS TEXT), INSTR(T2.start_date, '/') + 1) - SUBSTR(CAST(T2.start_date AS TEXT), INSTR(T2.start_date, ' ') - 5) <> SUBSTR(CAST(T2.end_date AS TEXT), INSTR(T2.end_date, '/') + 1) - SUBSTR(CAS...
the bike was borrowed and returned on a different day implies that start_date and end_date are not equal to each other; where the bike was returned refers to end_station_name;
[ "station.city", "station.name", "trip.end_date", "trip.start_date", "trip.start_station_name" ]
8,994
bike_share_1
CREATE TABLE "station" ( id INTEGER not null primary key, name TEXT, lat REAL, long REAL, dock_count INTEGER, city TEXT, installation_date TEXT ); CREATE TABLE "status" ( station_id INTEGER, bike...
Which is the station where no bike could not be borrowed form on the 2013/11/03 02:01:01? State the location of the station.
SELECT T1.name, T1.long FROM station AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.id WHERE T2.time = '2013/11/03 02:01:01' AND T2.bikes_available = 0
Latitude and longitude coordinates can be used to indicate a location, where latitude refers to lat longtitude refer to long; bikes_available = 0 means no bike can be borrowed; 3/11/2013 02:01:01 refers to time;
[ "station.id", "station.long", "station.name", "status.bikes_available", "status.station_id", "status.time" ]
8,995
bike_share_1
CREATE TABLE "station" ( id INTEGER not null primary key, name TEXT, lat REAL, long REAL, dock_count INTEGER, city TEXT, installation_date TEXT ); CREATE TABLE "status" ( station_id INTEGER, bike...
Name the station and city with the most borrowed bike.
SELECT T2.start_station_name, T1.city FROM station AS T1 INNER JOIN trip AS T2 ON T2.start_station_name = T1.name GROUP BY T2.start_station_name ORDER BY COUNT(T2.start_station_name) DESC LIMIT 1
the station with the most borrowed bikes refers to MAX(start_station);
[ "station.city", "station.name", "trip.start_station_name" ]
8,996
bike_share_1
CREATE TABLE "station" ( id INTEGER not null primary key, name TEXT, lat REAL, long REAL, dock_count INTEGER, city TEXT, installation_date TEXT ); CREATE TABLE "status" ( station_id INTEGER, bike...
What was the hottest temperature on the day of trip ID 4080?
SELECT MAX(T2.max_temperature_f) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code AND T2.date = SUBSTR(CAST(T1.start_date AS TEXT), 1, INSTR(T1.start_date, ' ') - 1) WHERE T1.id = 4080
the hottest temperature refers to max_temperature_f;
[ "trip.id", "trip.start_date", "trip.zip_code", "weather.date", "weather.max_temperature_f", "weather.zip_code" ]
8,997
bike_share_1
CREATE TABLE "station" ( id INTEGER not null primary key, name TEXT, lat REAL, long REAL, dock_count INTEGER, city TEXT, installation_date TEXT ); CREATE TABLE "status" ( station_id INTEGER, bike...
At what date and time did San Jose Diridon Caltrain Station have most bikes available.
SELECT T2.time FROM station AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.id WHERE T1.name = 'San Jose Diridon Caltrain Station' AND T2.bikes_available = ( SELECT MAX(T2.bikes_available) FROM station AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.id WHERE T1.name = 'San Jose Diridon Caltrain Station' )
San Jose Diridon Caltrain Station is the name of the station; most bikes available refers to MAX(bikes_available);
[ "station.id", "station.name", "status.bikes_available", "status.station_id", "status.time" ]
8,998
bike_share_1
CREATE TABLE "station" ( id INTEGER not null primary key, name TEXT, lat REAL, long REAL, dock_count INTEGER, city TEXT, installation_date TEXT ); CREATE TABLE "status" ( station_id INTEGER, bike...
Name all the trip on the days when it rained. State the duration of the trip
SELECT T1.id, T1.duration FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code AND T2.date = SUBSTR(CAST(T1.start_date AS TEXT), 1, INSTR(T1.start_date, ' ') - 1) WHERE T2.events LIKE '%Rain%' OR T2.events LIKE '%rain%'
events = 'Rain';
[ "trip.duration", "trip.id", "trip.start_date", "trip.zip_code", "weather.date", "weather.events", "weather.zip_code" ]
8,999
bike_share_1
CREATE TABLE "station" ( id INTEGER not null primary key, name TEXT, lat REAL, long REAL, dock_count INTEGER, city TEXT, installation_date TEXT ); CREATE TABLE "status" ( station_id INTEGER, bike...
List all trips where bikes were returned at location 37.331415, -121.8932. State the date the bike was borrowed.
SELECT T2.end_station_name, T2.start_date FROM station AS T1 INNER JOIN trip AS T2 ON T2.end_station_name = T1.name WHERE T1.lat = 37.331415 AND T1.long = -121.8932
37.331415 and -121.8932 are latitude (lat) and longitude (long) coordinates indicating location; returned at refers to end_station_name; the date the bike was borrowed refers to start_date;
[ "station.lat", "station.long", "station.name", "trip.end_station_name", "trip.start_date" ]