Chinastark/bird_dataset huggingface dataset:
Database: food_inspection
Question: Among violations on 3rd June, 2014, describe any 5 names, located cities and tax codes of the eateries with high risk category.
Evidence: eateries with high risk category refer to business_id where risk_category = 'High Risk'; 3rd June, 2014 refers to date = '2014-06-03';
SQL: SELECT DISTINCT T2.name, T2.city, T2.tax_code FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.risk_category = 'High Risk' AND T1.`date` = '2014-06-03' LIMIT 5
Database: food_inspection
Question: What was the inspection type when El Aji Peruvian Restaurant got highest inspection score?
Evidence: El Aji Peruvian Restaurant is the name of the business; highest inspection score refers to MAX(score);
SQL: SELECT T1.type FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'El Aji Peruvian Restaurant' ORDER BY T1.score DESC LIMIT 1
Database: food_inspection
Question: Who were the owners of eateries which had highest health hazard by improper cooking time or temperatures?
Evidence: owners of eateries refer to owner_name; highest health hazard by improper cooking time or temperatures refers to risk_category = 'High Risk' and description = 'Improper cooking time or temperatures';
SQL: SELECT T2.owner_name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.risk_category = 'High Risk' AND T1.description = 'Improper cooking time or temperatures'
Database: food_inspection
Question: List the eateries' names and addresses which had reinspection on 2nd February, 2015.
Evidence: eateries which had reinspection on 2nd February, 2015 refer to business_id where date = '2015-02-02' and type = 'Reinspection/Followup';
SQL: SELECT T2.name, T2.address FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.`date` = '2015-02-02' AND T1.type = 'Reinspection/Followup'
Database: food_inspection
Question: List the names and business certificates of the eateries which got inspection score under 50.
Evidence: eateries which got inspection score under 50 refer to business_id where score < 50;
SQL: SELECT T2.name, T2.business_id FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.score < 50
Database: food_inspection
Question: How many of the businesses are located at 1825 POST St #223, San Francisco?
Evidence: 1825 POST St #223 refers to address = '1825 POST St #223', San Francisco is the name of the city;
SQL: SELECT COUNT(business_id) FROM businesses WHERE address = '1825 POST St #223' AND city = 'SAN FRANCISCO'
Database: food_inspection
Question: List down the owner's name with a zip code 94104.
Evidence: zip code 94104 refers to owner_zip = '94104';
SQL: SELECT DISTINCT owner_name FROM businesses WHERE owner_zip = '94104'
Database: food_inspection
Question: What is the total number of businesses with a tax code H25?
SQL: SELECT COUNT(tax_code) FROM businesses WHERE tax_code = 'H25'
Database: food_inspection
Question: In the violations in 2014, how many of them have a low risk category?
Evidence: in 2014 refers to year(date) = 2014; risk_category = 'Low Risk';
SQL: SELECT COUNT(risk_category) FROM violations WHERE STRFTIME('%Y', `date`) = '2014' AND risk_category = 'Low Risk'
Database: food_inspection
Question: Give the business ID and risk category of the business owned by San Francisco Madeleine, Inc.
Evidence: business owned by San Francisco Madeleine, Inc. refers to business_id where owner_name = 'San Francisco Madeleine, Inc.';
SQL: SELECT DISTINCT T2.business_id, T1.risk_category FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.owner_name = 'San Francisco Madeleine, Inc.'
Database: food_inspection
Question: List owner's name of businesses with a 100 score.
Evidence: owner's name of businesses refers to owner_name;
SQL: SELECT DISTINCT T2.owner_name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.score = 100
Database: food_inspection
Question: Among the businesses within the postal code 94117, what is total number of businesses with a high risk category?
Evidence: businesses with a high risk category refer to business_id where risk_category = 'High Risk';
SQL: SELECT COUNT(DISTINCT T2.business_id) FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.postal_code = 94117 AND T1.risk_category = 'High Risk'
Database: food_inspection
Question: Among the businesses with score that ranges from 70 to 80, list their violation type ID and risk category.
Evidence: businesses with score that ranges from 70 to 80 refer to business_id where score between 80 and 90;
SQL: SELECT DISTINCT T1.violation_type_id, T1.risk_category FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id INNER JOIN inspections AS T3 ON T2.business_id = T3.business_id WHERE T3.score BETWEEN 70 AND 80
Database: food_inspection
Question: List the tax code and inspection type of the business named "Rue Lepic".
Evidence: "Rue Lepic" is the name of the business;
SQL: SELECT DISTINCT T3.tax_code, T2.type FROM violations AS T1 INNER JOIN inspections AS T2 ON T1.business_id = T2.business_id INNER JOIN businesses AS T3 ON T2.business_id = T3.business_id WHERE T3.name = 'Rue Lepic'
Database: food_inspection
Question: In businesses that violates 103157 on May 27, 2016 , what is the name of the business that has an unscheduled inspection?
Evidence: businesses that violates 103157 refer to business_id where violation_type_id = 103157; date = '2016-05-27'; unscheduled inspection refers to type = 'Routine - Unscheduled';
SQL: SELECT DISTINCT T3.name FROM violations AS T1 INNER JOIN inspections AS T2 ON T1.business_id = T2.business_id INNER JOIN businesses AS T3 ON T2.business_id = T3.business_id WHERE T1.`date` = '2016-05-27' AND T1.violation_type_id = 103157 AND T2.type = 'Routine - Unscheduled'
Database: food_inspection
Question: Who is the owner of the business that has a high risk violation of 103109 and described as unclean or unsanitary food contact surfaces?
Evidence: owner refers to owner_name; high risk violation of 103109 and described as unclean or unsanitary food contact surfaces refers to risk_category = 'High Risk' where violation_type_id = 103109 and description = 'Unclean or unsanitary food contact surfaces';
SQL: SELECT DISTINCT T2.owner_name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.risk_category = 'High Risk' AND T1.violation_type_id = 103109 AND T1.description = 'Unclean or unsanitary food contact surfaces'
Database: food_inspection
Question: Among the owners from Cameron Park, what is the business name of the business with a score of 100?
Evidence: Cameron Park is a name of city;
SQL: SELECT DISTINCT T2.name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.owner_city = 'Cameron Park' AND T1.score = 100
Database: food_inspection
Question: List the violation type ID of business with business ID from 30 to 50 and located at 747 IRVING St, San Francisco.
Evidence: business ID from 30 to 50 refers to business_id between 30 and 50; address = '747 IRVING St'; city = 'San Francisco';
SQL: SELECT DISTINCT T1.violation_type_id FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.business_id BETWEEN 30 AND 50 AND T2.address = '747 IRVING St' AND T2.city = 'San Francisco'
Database: food_inspection
Question: What is the owner's name of the of the business that violates 103156 on June 12, 2014?
Evidence: business that violates 103156 on June 12, 2014 refers to business_id where violation_type_id = 103156 and date = '2014-06-12';
SQL: SELECT DISTINCT T2.owner_name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.violation_type_id = 103156 AND T1.`date` = '2014-06-12'
Database: food_inspection
Question: In businesses with an owner address 500 California St, 2nd Floor of Silicon Valley, list the type of inspection of the business with the highest score.
Evidence: the highest score MAX(score); Silicon Valley is located in 'SAN FRANCISCO';
SQL: SELECT T1.type FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.owner_address = '500 California St, 2nd Floor' AND T2.owner_city = 'SAN FRANCISCO' ORDER BY T1.score DESC LIMIT 1
Database: food_inspection
Question: Among the violations in 2016, how many of them have unscheduled inspections?
Evidence: unscheduled inspections refer to type = 'Routine - Unschedule'; year(date) = 2016;
SQL: SELECT COUNT(T2.business_id) FROM violations AS T1 INNER JOIN inspections AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2016' AND T2.type = 'Routine - Unscheduled'
Database: food_inspection
Question: List the business' name and risk category of businesses with a score greater than the 80% of average score of all businesses.
Evidence: score greater than the 80% of average score of all businesses refers to score > MULTIPLY(0.8, avg(score) from inspections);
SQL: SELECT DISTINCT T1.name, T3.risk_category FROM businesses AS T1 INNER JOIN inspections AS T2 ON T1.business_id = T2.business_id INNER JOIN violations AS T3 ON T1.business_id = T3.business_id WHERE T2.score > 0.8 * ( SELECT AVG(score) FROM inspections )
Database: food_inspection
Question: In businesses with a score lower than 95 and located around the postal code of 94110, what is the percentage of businesses with a risk category of low risk?
Evidence: DIVIDE(COUNT(business_id where risk_category = 'Low Risk', score < 95 and postal_code = 94110), COUNT(business_id where score < 95 and postal_code = 94110)) as percentage;
SQL: SELECT CAST(SUM(CASE WHEN T1.risk_category = 'Low Risk' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.risk_category) FROM violations AS T1 INNER JOIN inspections AS T2 ON T1.business_id = T2.business_id INNER JOIN businesses AS T3 ON T2.business_id = T3.business_id WHERE T2.score < 95 AND T3.postal_code = 94110
Database: craftbeer
Question: Which distinct state makes beer that has the least amount of bitterness?
SQL: SELECT DISTINCT T2.state, T1.ibu FROM beers AS T1 INNER JOIN breweries AS T2 ON T1.brewery_id = T2.id WHERE T1.ibu IS NOT NULL AND T1.ibu = ( SELECT MIN(ibu) FROM beers )
Database: craftbeer
Question: Where in New York can you locate the brewery that makes the bitterest beer? List both the brewery's name and the name of the city.
Evidence: The more IBU, the more bitter the beer is, bitterest means highest IBU.
SQL: SELECT T2.name, T2.city FROM beers AS T1 INNER JOIN breweries AS T2 ON T1.brewery_id = T2.id WHERE T2.state = 'NY' ORDER BY T1.ibu DESC LIMIT 1
Database: craftbeer
Question: What is the average alcohol content per 12-ounce beer bottle produced by Boston Beer Company?
SQL: SELECT AVG(T1.abv) FROM beers AS T1 INNER JOIN breweries AS T2 ON T1.brewery_id = T2.id WHERE T2.name = 'Boston Beer Company' AND T1.ounces = 12
Database: craftbeer
Question: Of all the beer styles produced by Stevens Point Brewery, how many percent do they allot for American Adjunct Lager?
Evidence: Percent allotted = count(American Adjunct Lager beer styles) / count(styles) * 100%
SQL: SELECT CAST(SUM(IIF(T1.style = 'American Adjunct Lager', 1, 0)) AS REAL) * 100 / COUNT(T1.brewery_id) FROM beers AS T1 INNER JOIN breweries AS T2 ON T1.brewery_id = T2.id WHERE T2.name = 'Stevens Point Brewery'
Database: craftbeer
Question: Which city and state produces the most and least bitter beer, and what is the difference in bitterness between the two? List also the names of the beer.
Evidence: The more IBU, the more bitter the beer is, most bitter means highest IBU; The less IBU, the less bitter the beer is, least bitter means lowest IBU
SQL: SELECT T1.state, T1.city, T2.name, T2.ibu FROM breweries AS T1 INNER JOIN beers AS T2 ON T1.id = T2.brewery_id GROUP BY T1.state, T1.city, T2.name, T2.ibu HAVING MAX(ibu) AND MIN(ibu) LIMIT 2
Database: craftbeer
Question: When compared to the total number of breweries in the US producing American Blonde Ale, how many in the state of Wisconsin produces American Blonde Ale? Indicate your answer in percentage (%).
Evidence: Percentage of the state of Wisconsin produces American Blonde Ale could be computed by count(breweries in Wisconsin producing American Blonde Ale) / count(all breweries)
SQL: SELECT CAST(SUM(IIF(T2.state = 'WI', 1, 0)) AS REAL) * 100 / COUNT(T1.id) FROM beers AS T1 INNER JOIN breweries AS T2 ON T1.brewery_id = T2.id WHERE T1.style = 'American Blonde Ale'
Database: cookbook
Question: What is the title of the recipe that is most likely to gain weight?
Evidence: most likely to gain weight refers to MAX(total_fat)
SQL: SELECT T1.title 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: What is the unsaturated fat content in the recipe "Raspberry Chiffon Pie"?
Evidence: Raspberry Chiffon Pie refers to title; unsaturated fat refers to SUBTRACT(total_fat, sat_fat)
SQL: SELECT T2.total_fat - T2.sat_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: Please list the titles of all the recipes that are salt/sodium-free.
Evidence: salt/sodium-free refers to sodium < 5
SQL: SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.sodium < 5
Database: cookbook
Question: Please list the titles of all the recipes that may lead to constipation, feeling sick or stomach pain.
Evidence: may lead to constipation, feeling sick or stomach pain 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 is more beneficial in wound healing, "Raspberry Chiffon Pie" or "Fresh Apricot Bavarian"?
Evidence: Raspberry Chiffon Pie and Fresh Apricot Bavarian are title; vitamin_c is higher refers to MAX(vitamin_c)
SQL: SELECT DISTINCT CASE WHEN CASE WHEN T2.title = 'Raspberry Chiffon Pie' THEN T1.vitamin_c END > CASE WHEN T2.title = 'Fresh Apricot Bavarian' THEN T1.vitamin_c END THEN 'Raspberry Chiffon Pie' ELSE 'Fresh Apricot Bavarian' END AS "vitamin_c is higher" FROM Nutrition T1 INNER JOIN Recipe T2 ON T2.recipe_id = T1.recipe_id
Database: cookbook
Question: Among the recipes that take more than 10 minutes to prepare, what is the title of the one with the most calories?
Evidence: more than 10 minutes to prepare refers to prep_min > 10; the most 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.prep_min > 10 ORDER BY T2.calories DESC LIMIT 1
Database: cookbook
Question: How many calories does the recipe "Raspberry Chiffon Pie" contain?
Evidence: Raspberry Chiffon Pie refers to title
SQL: SELECT T2.calories 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: Is the ingredient "graham cracker crumbs" optional in the recipe "Raspberry Chiffon Pie"?
Evidence: 'graham cracker crumbs' is a name of an ingredient; 'Raspberry Chiffon Pie' refers to title
SQL: SELECT T2.optional 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' AND T3.name = 'graham cracker crumbs'
Database: cookbook
Question: How many ingredients must be rationed in the recipe "Raspberry Chiffon Pie"?
Evidence: Raspberry Chiffon Pie refers to title; ingredient must be rationed refers to max_qty = min_qty
SQL: SELECT COUNT(*) FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Raspberry Chiffon Pie' AND T2.max_qty = T2.min_qty
Database: cookbook
Question: Please list the names of all the ingredients needed for the recipe "Raspberry Chiffon Pie" that do not need preprocessing.
Evidence: Raspberry Chiffon Pie refers to title; do not need preprocessing refers to preparation IS NULL
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 = 'Raspberry Chiffon Pie' AND T2.preparation IS NULL
Database: cookbook
Question: How many recipes include the ingredient "graham cracker crumbs"?
Evidence: 'graham cracker crumbs' is a name of an ingredient
SQL: SELECT COUNT(*) FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id WHERE T1.name = 'graham cracker crumbs'
Database: cookbook
Question: At least how many cups of graham cracker crumbs does the recipe "Raspberry Chiffon Pie" need?
Evidence: 'graham cracker crumbs' is a name of an ingredient; 'Raspberry Chiffon Pie' refers to title
SQL: SELECT T2.min_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.title = 'Raspberry Chiffon Pie' AND T3.name = 'graham cracker crumbs'
Database: cookbook
Question: How many calories from fat are there in the recipe "Raspberry Chiffon Pie"?
Evidence: calories from fat refers to MULTIPLY(calories, pcnt_cal_fat)||'%; Raspberry Chiffon Pie refers to title
SQL: SELECT T2.calories * T2.pcnt_cal_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: How many calories on average does a recipe that comes from "Produce for Better Health Foundation and 5 a Day" contain?
Evidence: Produce for Better Health Foundation and 5 a Day is a source of recipe; calculation = DIVIDE(SUM(calories), COUNT(recipe_id))
SQL: SELECT AVG(T2.calories) FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.source = 'Produce for Better Health Foundation and 5 a Day'
Database: cookbook
Question: How many calories does the turkey tenderloin bundles recipe have?
Evidence: turkey tenderloin refers to title
SQL: SELECT T2.calories FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Turkey Tenderloin Bundles'
Database: cookbook
Question: How many cups of 1% lowfat milk should be added to no.1436 recipe?
Evidence: 1% lowfat milk is a name of an ingredient; no.1436 recipe refers to recipe_id = 1436; max_qty = min_qty
SQL: SELECT COUNT(*) FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id WHERE T1.name = '1% lowfat milk' AND T2.unit = 'cup(s)' AND T2.recipe_id = 1436
Database: cookbook
Question: Which recipe in the database contains the most total fat? Give its title.
Evidence: the most total fat refers to MAX(total_fat)
SQL: SELECT T1.title 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: How many times do seedless red grapes appear in the recipes?
Evidence: seedless red grapes is a name of an ingredient
SQL: SELECT COUNT(*) FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id WHERE T1.name = 'seedless red grapes'
Database: cookbook
Question: State the name of the optional ingredient of no.1397 recipe.
Evidence: no.1397 recipe refers to recipe_id = 1397; optional ingredient refers to optional = 'TRUE'
SQL: SELECT T1.name FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id WHERE T2.recipe_id = 1397 AND T2.optional = 'TRUE'
Database: cookbook
Question: Which recipe needs the most frozen raspberries in light syrup? State its title.
Evidence: frozen raspberries in light syrup is a name of an ingredient; max_qty = min_qty
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 = 'frozen raspberries in light syrup' AND T2.max_qty = T2.min_qty
Database: cookbook
Question: Give the name of the most widely used ingredient.
Evidence: the most widely used ingredient refers to MAX(COUNT(ingredient_id))
SQL: SELECT T1.name FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id GROUP BY T1.name ORDER BY COUNT(T1.name) DESC LIMIT 1
Database: cookbook
Question: What kind of preparation is needed for apple juice to make a raspberry-pear couscous cake?
Evidence: apple juice is a name of an ingredient; raspberry-pear couscous cake refers to title
SQL: SELECT T2.preparation 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-Pear Couscous Cake' AND T3.name = 'apple juice'
Database: cookbook
Question: How many cups of almonds do you need for a chicken pocket sandwich?
Evidence: cups is a unit; almonds is a name of an ingredient; chicken pocket sandwich 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 T1.title = 'Chicken Pocket Sandwich' AND T3.name = 'almonds' AND T2.unit = 'cup(s)'
Database: cookbook
Question: Name the recipe with the most Vitamin C.
Evidence: the most Vitamin C 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 1
Database: cookbook
Question: How much Vitamin A is in Sherry beef?
Evidence: Sherry beef refers to title = 'Sherried Beef'
SQL: SELECT T2.vitamin_a FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Sherried Beef'
Database: cookbook
Question: State the title of the recipe with most kinds of ingredients.
Evidence: the most kinds of ingredients refers to MAX(COUNT(recipe_id))
SQL: SELECT T1.title FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id GROUP BY T1.title ORDER BY COUNT(title) DESC LIMIT 1
Database: cookbook
Question: How many times is the sodium content in Lasagne-Spinach Spirals to Beef and Spinach Pita Pockets?
Evidence: sodium is a name of an ingredient; calculation = DIVIDE(SUM(title = 'Lasagne-Spinach Spirals' THEN sodium), SUM(title = 'Beef and Spinach Pita Pockets' THEN sodium))
SQL: SELECT CAST(SUM(CASE WHEN T1.title = 'Lasagne-Spinach Spirals' THEN T2.sodium ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T1.title = 'Beef and Spinach Pita Pockets' THEN T2.sodium ELSE 0 END) FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id
Database: cookbook
Question: What is the average calorie count for all recipes using coarsely ground black pepper?
Evidence: coarsely ground black pepper is a name of an ingredient; calculation = AVG(calories)
SQL: SELECT AVG(T3.calories) 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.name = 'coarsely ground black pepper'
Database: cookbook
Question: What are the names of the recipes that will cause stomach pain?
Evidence: cause stomach pain 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: How many ingredients are there in Apricot Yogurt Parfaits?
Evidence: Apricot Yogurt Parfaits 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 = 'Apricot Yogurt Parfaits'
Database: cookbook
Question: What are the names of the ingredients that need to be cook in beef broth?
Evidence: 'cook in beef broth' refers to a preparation
SQL: SELECT T1.name FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id WHERE T2.preparation = 'cooked in beef broth'