db_id
stringclasses 69
values | question
stringlengths 24
325
| evidence
stringlengths 1
673
⌀ | SQL
stringlengths 23
804
| schema
stringclasses 69
values |
---|---|---|---|---|
food_inspection | For the business which got the most number of violations, how many inspections did it have? | null | SELECT COUNT(T2.business_id) FROM violations AS T1 INNER JOIN inspections AS T2 ON T1.business_id = T2.business_id GROUP BY T1.business_id ORDER BY COUNT(T1.business_id) DESC LIMIT 1 | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | For the business whose business certificate number is 304977, how many violations did it have on 2013/10/7? | date = '2013-10-07'; | SELECT COUNT(T1.business_id) FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.business_certificate = '304977' AND T1.`date` = '2013-10-07' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | What is the average score for "Chairman Bao" in all its unscheduled routine inspections? | DIVIDE(SUM(score where type = 'Routine - Unscheduled' and name = 'Chairman Bao'), COUNT(type = 'Routine - Unscheduled' where name = 'Chairman Bao')); | SELECT CAST(SUM(CASE WHEN T2.name = 'Chairman Bao' THEN T1.score ELSE 0 END) AS REAL) / COUNT(CASE WHEN T1.type = 'Routine - Unscheduled' THEN T1.score ELSE 0 END) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | What percentage of the violations for "Melody Lounge" are moderate risks? | DIVIDE(COUNT(risk_category = 'Moderate Risk' where name = 'Melody Lounge'), COUNT(business_id where name = 'Melody Lounge')) as percentage; | SELECT CAST(SUM(CASE WHEN T2.risk_category = 'Moderate Risk' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.business_id) FROM businesses AS T1 INNER JOIN violations AS T2 ON T1.business_id = T2.business_id WHERE T1.name = 'Melody Lounge' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | How many eateries are located in Hayward? | eateries in Hayward refer city = 'HAYWARD'; | SELECT COUNT(business_id) FROM businesses WHERE city = 'HAYWARD' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | How many establishments have an inspection score of no more than 50? | establishments have the same meaning as businesses; inspection score of no more than 50 refers to score < 50; | SELECT COUNT(DISTINCT business_id) FROM inspections WHERE score < 50 | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | How many eateries applied in 2012? | eateries applied in 2012 refer to business_id where application_date between '2012-01-01' and '2012-12-31'; | SELECT COUNT(business_id) FROM businesses WHERE STRFTIME('%Y', application_date) = '2012' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | How many foodborne illness investigations were done in 2014? | foodborne illness investigations refer to inspections where type = 'Foodborne Illness Investigation'; investigations in 2014 refers to date between '2014-01-01' and '2014-12-31'; | SELECT COUNT(business_id) FROM inspections WHERE STRFTIME('%Y', `date`) = '2014' AND type = 'Foodborne Illness Investigation' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | How many owners have 5 or more establishments? | 5 or more establishments COUNT(business_id) > = 5; | SELECT COUNT(T1.owner_name) FROM ( SELECT owner_name FROM businesses GROUP BY owner_name HAVING COUNT(owner_name) > 5 ) T1 | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | What are the names of the establishments that met all of the required standards in 2013? | establishments have the same meaning as businesses; met all of the required standards refers to score = 100; year(date) = 2013 | SELECT DISTINCT T2.name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2013' AND T1.score = 100 | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | In 2016, which city has the highest number of establishments with the highest health and safety hazards? | the highest health and safety hazards refer to risk_category = 'High Risk'; year(date) = 2016; establishments has the same meaning as businesses; | SELECT T2.city FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2016' AND T1.risk_category = 'High Risk' GROUP BY T2.city ORDER BY COUNT(T2.city) DESC LIMIT 1 | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | What is the name of the establishment with the lowest inspection score of all time? | the lowest inspection score refers to MIN(score); | SELECT T2.name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.score = ( SELECT MIN(score) FROM inspections ) | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | How many high risks violations did the Tiramisu Kitchen violate? | Tiramisu Kitchen is the name of the business; high risks violations refer to risk_category = 'High Risk'; | SELECT COUNT(T1.business_id) FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Tiramisu Kitchen' AND T1.risk_category = 'High Risk' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | How many establishments with the tax code H24 have complaint inspections of 5 or more? | establishments with the tax code H24 refer to business_id where tax_code = 'H24'; complaint inspections of 5 or more refer to inspections where type = 'Complaint' and COUNT(business_id) ≥ 5; | SELECT COUNT(*) FROM ( SELECT T1.business_id FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.tax_code = 'H24' AND T1.type = 'Complaint' GROUP BY T1.business_id HAVING COUNT(T1.business_id) > 5 ) T3 | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | In 2013, what are the names of the establishments with contaminated or adulterated food? | establishments have the same meaning as businesses; contaminated or adulterated food refers to violations where description = 'Contaminated or adulterated food'; date = '2013'; | SELECT T2.name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2013' AND T1.description = 'Contaminated or adulterated food' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | Among the establishments with a postal code of 94102, how many establishments have a score of 90 or more in 2015? | establishment has the same meaning as business; score of 90 or more refers to score ≥ 90; year(date) = 2015; | SELECT COUNT(DISTINCT T2.business_id) 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 STRFTIME('%Y', T1.`date`) = '2015' AND T2.postal_code = '94102' AND T3.score > 90 | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | What are the names of the establishments that met all the required standards for 4 consecutive years? | establishment has the same meaning as business; score of 90 or more refers to score ≥ 90; year(date) = 2015; ; met all required standards for 4 consecutive years refers to COUNT(year(date)) = 4 where score = 100; | SELECT DISTINCT T4.name FROM ( SELECT T3.name, T3.years, row_number() OVER (PARTITION BY T3.name ORDER BY T3.years) AS rowNumber FROM ( SELECT DISTINCT name, STRFTIME('%Y', `date`) AS years FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.score = 100 ) AS T3 ) AS T4 GROUP BY T4.name, date(T4.years || '-01-01', '-' || (T4.rowNumber - 1) || ' years') HAVING COUNT(T4.years) = 4 | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | Between 2014 to 2016, what is the average inpsection score of the establishment owned by Yiu Tim Chan in 808 Pacific Ave, San Francisco? | average inspection score refers to avg(score); establishment owned by Yiu Tim Chan refers to business_id where owner_name = 'Yiu Tim Chan'; Between 2014 to 2016 refers to year(date) between 2014 and 2016; address = '808 Pacific Ave'; city = 'San Francisco'; | SELECT AVG(T1.score) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) BETWEEN '2014' AND '2016' AND T2.owner_name = 'Yiu Tim Chan' AND T2.address = '808 Pacific Ave' AND T2.city = 'San Francisco' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | What is the average score of the establishments owned by the owner with the highest number of establishments? | average score refers avg(score); owner with the highest number of establishments refers to owner_name where MAX(COUNT(business_id)); | SELECT AVG(T1.score) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id GROUP BY T2.owner_name ORDER BY COUNT(T2.business_id) DESC LIMIT 1 | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | What is the name of the establishment with the highest number of low risk violations in 2014? | establishment with the highest number of low risk violations refers to business_id where MAX(COUNT(risk_category = 'Low Risk')); year(date) = 2014; | SELECT T2.name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2014' AND T1.risk_category = 'Low Risk' GROUP BY T2.name ORDER BY COUNT(T2.business_id) DESC LIMIT 1 | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | Among the top 5 owners with highest number of establishments, which owner has the highest number of high risk violations? Give the name of the owner. | 5 owners with highest number of establishments refer to owner_name where MAX(COUNT(business_id)) LIMIT 5; the highest number of high risk violations refers to MAX(COUNT(risk_category = 'High Risk')); | SELECT T4.owner_name FROM violations AS T3 INNER JOIN businesses AS T4 ON T3.business_id = T4.business_id INNER JOIN ( SELECT T2.owner_name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id GROUP BY T2.owner_name ORDER BY COUNT(T1.business_id) DESC LIMIT 5 ) AS T5 ON T4.owner_name = T5.owner_name WHERE T3.risk_category = 'High Risk' GROUP BY T4.owner_name ORDER BY COUNT(T3.risk_category) DESC LIMIT 1 | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | Which establishment has the highest number of inspections done? Give the name of the establishment and calculate for its average score per inspection. | establishment refers to business_id; the highest number of inspections refers to MAX(COUNT(business_id)); avg(score); | SELECT T2.name, AVG(T1.score) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id GROUP BY T2.name ORDER BY COUNT(T2.business_id) DESC LIMIT 1 | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | How many eateries got highest inspection in 2013? | eateries got highest inspection score in 2013 refer to business_id from inspections where score = 100 and year(date) = 2013; | SELECT COUNT(DISTINCT business_id) FROM inspections WHERE STRFTIME('%Y', `date`) = '2013' AND score = ( SELECT MAX(score) FROM inspections WHERE STRFTIME('%Y', `date`) = '2013' ) | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | List down the eateries' IDs with structural inspection type in February 2016. | eateries' IDs refer to business_id; structural inspection type refers to inspections WHERE type = 'Structural Inspection'; in February 2016 refers to year(date) = 2016 and month(date) = 2; | SELECT business_id FROM inspections WHERE type = 'Structural Inspection' AND `date` LIKE '2016-02%' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | How many eateries had low risk for violation with unpermitted food facility description? | eateries represent business; low risk for violation refers to risk_category = 'Low Risk'; | SELECT COUNT(DISTINCT business_id) FROM violations WHERE risk_category = 'Low Risk' AND description = 'Unpermitted food facility' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | Provide eateries' IDs, risk categories and descriptions with violation ID of 103101. | eateries' IDs refer to business_id; violation ID of 103101 refers to violation_type_id = '103101'; | SELECT business_id, risk_category, description FROM violations WHERE violation_type_id = '103101' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | When did eateries from San Bruno city get highest score in inspection? | eateries represent business; highest score in inspection refers to score = 100; | SELECT T1.`date` FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.city = 'SAN BRUNO' ORDER BY T1.score DESC LIMIT 1 | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | Describe the inspection types and violation descriptions under moderate risk category for ART's CAFÉ. | ART's CAFÉ is the name of the business; moderate risk category refers to risk_category = 'Moderate Risk'; | SELECT DISTINCT T2.type, T1.description 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 = 'ART''S CAFÉ' AND T1.risk_category = 'Moderate Risk' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | Mention the violation type ID and description of high risk category for STARBUCKS. | STARBUCKS is the name of the business; high risk category refers to risk_category = 'High Risk'; | SELECT DISTINCT T1.violation_type_id, T1.description FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'STARBUCKS' AND T1.risk_category = 'High Risk' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | List the inspection dates, scores and inspection types for the eateries with tax code AA. | eateries with tax code AA refer to business_id where tax_code = 'AA'; | SELECT T1.`date`, T1.score, T1.type FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.tax_code = 'AA' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | Provide eateries' IDs, names and addresses which were inspected on 30th July, 2016. | eateries' IDs inspected on 30th July, 2016 refer to business_id where business_id is not null and date = '2016-07-30'; | SELECT DISTINCT T2.business_id, T2.name, T2.address FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.date = '2016-07-30' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | Describe the violation dates, risk categories, descriptions and names of the eateries under Jade Chocolates LLC. | eateries under Jade Chocolates LLC refer to business_id where owner_name = 'Jade Chocolates LLC'; | SELECT T1.`date`, T1.risk_category, T1.description, T2.name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.owner_name = 'Jade Chocolates LLC' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | Provide the names, risk categories and descriptions for the eateries with violation type ID of 103111. | eateries refer to business_id; | SELECT T2.name, T1.risk_category, T1.description FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.violation_type_id = '103111' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | Among violations on 3rd June, 2014, describe any 5 names, located cities and tax codes of the eateries with high risk category. | eateries with high risk category refer to business_id where risk_category = 'High Risk'; 3rd June, 2014 refers to date = '2014-06-03'; | 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 name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | What was the inspection type when El Aji Peruvian Restaurant got highest inspection score? | El Aji Peruvian Restaurant is the name of the business; highest inspection score refers to MAX(score); | 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 name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | Who were the owners of eateries which had highest health hazard by improper cooking time or temperatures? | 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'; | 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 name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | List the eateries' names and addresses which had reinspection on 2nd February, 2015. | eateries which had reinspection on 2nd February, 2015 refer to business_id where date = '2015-02-02' and type = 'Reinspection/Followup'; | 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 name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | List the names and business certificates of the eateries which got inspection score under 50. | eateries which got inspection score under 50 refer to business_id where score < 50; | 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 name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | How many of the businesses are located at 1825 POST St #223, San Francisco? | 1825 POST St #223 refers to address = '1825 POST St #223', San Francisco is the name of the city; | SELECT COUNT(business_id) FROM businesses WHERE address = '1825 POST St #223' AND city = 'SAN FRANCISCO' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | List down the owner's name with a zip code 94104. | zip code 94104 refers to owner_zip = '94104'; | SELECT DISTINCT owner_name FROM businesses WHERE owner_zip = '94104' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | What is the total number of businesses with a tax code H25? | null | SELECT COUNT(tax_code) FROM businesses WHERE tax_code = 'H25' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | In the violations in 2014, how many of them have a low risk category? | in 2014 refers to year(date) = 2014; risk_category = 'Low Risk'; | SELECT COUNT(risk_category) FROM violations WHERE STRFTIME('%Y', `date`) = '2014' AND risk_category = 'Low Risk' | database name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | Give the business ID and risk category of the business owned by San Francisco Madeleine, Inc. | business owned by San Francisco Madeleine, Inc. refers to business_id where owner_name = 'San Francisco Madeleine, Inc.'; | 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 name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | List owner's name of businesses with a 100 score. | owner's name of businesses refers to owner_name; | 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 name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | Among the businesses within the postal code 94117, what is total number of businesses with a high risk category? | businesses with a high risk category refer to business_id where risk_category = 'High Risk'; | 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 name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | Among the businesses with score that ranges from 70 to 80, list their violation type ID and risk category. | businesses with score that ranges from 70 to 80 refer to business_id where score between 80 and 90; | 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 name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | List the tax code and inspection type of the business named "Rue Lepic". | "Rue Lepic" is the name of the business; | 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 name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | In businesses that violates 103157 on May 27, 2016 , what is the name of the business that has an unscheduled inspection? | businesses that violates 103157 refer to business_id where violation_type_id = 103157; date = '2016-05-27'; unscheduled inspection refers to type = 'Routine - Unscheduled'; | 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 name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | Who is the owner of the business that has a high risk violation of 103109 and described as unclean or unsanitary food contact surfaces? | owner refers to owner_name; high risk violation of 103109 and described as unclean or unsanitary food contact surfaces refers to risk_category = 'High Risk' where violation_type_id = 103109 and description = 'Unclean or unsanitary food contact surfaces'; | 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 name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | Among the owners from Cameron Park, what is the business name of the business with a score of 100? | Cameron Park is a name of city; | 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 name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | List the violation type ID of business with business ID from 30 to 50 and located at 747 IRVING St, San Francisco. | business ID from 30 to 50 refers to business_id between 30 and 50; address = '747 IRVING St'; city = 'San Francisco'; | 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 name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | What is the owner's name of the of the business that violates 103156 on June 12, 2014? | business that violates 103156 on June 12, 2014 refers to business_id where violation_type_id = 103156 and date = '2014-06-12'; | 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 name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | In businesses with an owner address 500 California St, 2nd Floor of Silicon Valley, list the type of inspection of the business with the highest score. | the highest score MAX(score); Silicon Valley is located in 'SAN FRANCISCO'; | 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 name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | Among the violations in 2016, how many of them have unscheduled inspections? | unscheduled inspections refer to type = 'Routine - Unschedule'; year(date) = 2016; | 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 name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | List the business' name and risk category of businesses with a score greater than the 80% of average score of all businesses. | score greater than the 80% of average score of all businesses refers to score > MULTIPLY(0.8, avg(score) from inspections); | 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 name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
food_inspection | In businesses with a score lower than 95 and located around the postal code of 94110, what is the percentage of businesses with a risk category of low risk? | DIVIDE(COUNT(business_id where risk_category = 'Low Risk', score < 95 and postal_code = 94110), COUNT(business_id where score < 95 and postal_code = 94110)) as percentage; | 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 name:db_id food_inspection
businesses table businesses Cols: business id dtype integer, name dtype text, address dtype text, city dtype text, postal code dtype text, latitude dtype real, longitude dtype real, phone number dtype integer, tax code dtype text, business certificate dtype integer, application date dtype date, owner name dtype text, owner address dtype text, owner city dtype text, owner state dtype text, owner zip dtype text,
inspections table inspections Cols: business id dtype integer, score dtype integer, date dtype date, type dtype text,
violations table violations Cols: business id dtype integer, date dtype date, violation type id dtype text, risk category dtype text, description dtype text,
|
craftbeer | Which distinct state makes beer that has the least amount of bitterness? | null | 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 name:db_id craftbeer
Breweries table Breweries Cols: id dtype integer, name dtype text, city dtype text, state dtype text,
Beers table Beers Cols: id dtype integer, brewery id dtype integer, alcohol by volume dtype real, International Bitterness Units dtype real, name dtype text, style dtype text, ounces dtype real,
|
craftbeer | Where in New York can you locate the brewery that makes the bitterest beer? List both the brewery's name and the name of the city. | The more IBU, the more bitter the beer is, bitterest means highest IBU. | 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 name:db_id craftbeer
Breweries table Breweries Cols: id dtype integer, name dtype text, city dtype text, state dtype text,
Beers table Beers Cols: id dtype integer, brewery id dtype integer, alcohol by volume dtype real, International Bitterness Units dtype real, name dtype text, style dtype text, ounces dtype real,
|
craftbeer | What is the average alcohol content per 12-ounce beer bottle produced by Boston Beer Company? | null | 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 name:db_id craftbeer
Breweries table Breweries Cols: id dtype integer, name dtype text, city dtype text, state dtype text,
Beers table Beers Cols: id dtype integer, brewery id dtype integer, alcohol by volume dtype real, International Bitterness Units dtype real, name dtype text, style dtype text, ounces dtype real,
|
craftbeer | Of all the beer styles produced by Stevens Point Brewery, how many percent do they allot for American Adjunct Lager? | Percent allotted = count(American Adjunct Lager beer styles) / count(styles) * 100% | 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 name:db_id craftbeer
Breweries table Breweries Cols: id dtype integer, name dtype text, city dtype text, state dtype text,
Beers table Beers Cols: id dtype integer, brewery id dtype integer, alcohol by volume dtype real, International Bitterness Units dtype real, name dtype text, style dtype text, ounces dtype real,
|
craftbeer | 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. | 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 | 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 name:db_id craftbeer
Breweries table Breweries Cols: id dtype integer, name dtype text, city dtype text, state dtype text,
Beers table Beers Cols: id dtype integer, brewery id dtype integer, alcohol by volume dtype real, International Bitterness Units dtype real, name dtype text, style dtype text, ounces dtype real,
|
craftbeer | 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 (%). | 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) | 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 name:db_id craftbeer
Breweries table Breweries Cols: id dtype integer, name dtype text, city dtype text, state dtype text,
Beers table Beers Cols: id dtype integer, brewery id dtype integer, alcohol by volume dtype real, International Bitterness Units dtype real, name dtype text, style dtype text, ounces dtype real,
|
cookbook | What is the title of the recipe that is most likely to gain weight? | most likely to gain weight refers to MAX(total_fat) | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | What is the unsaturated fat content in the recipe "Raspberry Chiffon Pie"? | Raspberry Chiffon Pie refers to title; unsaturated fat refers to SUBTRACT(total_fat, sat_fat) | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | Please list the titles of all the recipes that are salt/sodium-free. | salt/sodium-free refers to sodium < 5 | SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.sodium < 5 | database name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | Please list the titles of all the recipes that may lead to constipation, feeling sick or stomach pain. | may lead to constipation, feeling sick or stomach pain refers to iron > 20 | SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.iron > 20 | database name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | Which recipe is more beneficial in wound healing, "Raspberry Chiffon Pie" or "Fresh Apricot Bavarian"? | Raspberry Chiffon Pie and Fresh Apricot Bavarian are title; vitamin_c is higher refers to MAX(vitamin_c) | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | Among the recipes that take more than 10 minutes to prepare, what is the title of the one with the most calories? | more than 10 minutes to prepare refers to prep_min > 10; the most calories refers to MAX(calories) | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | How many calories does the recipe "Raspberry Chiffon Pie" contain? | Raspberry Chiffon Pie refers to title | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | Is the ingredient "graham cracker crumbs" optional in the recipe "Raspberry Chiffon Pie"? | 'graham cracker crumbs' is a name of an ingredient; 'Raspberry Chiffon Pie' refers to title | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | How many ingredients must be rationed in the recipe "Raspberry Chiffon Pie"? | Raspberry Chiffon Pie refers to title; ingredient must be rationed refers to max_qty = min_qty | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | Please list the names of all the ingredients needed for the recipe "Raspberry Chiffon Pie" that do not need preprocessing. | Raspberry Chiffon Pie refers to title; do not need preprocessing refers to preparation IS NULL | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | How many recipes include the ingredient "graham cracker crumbs"? | 'graham cracker crumbs' is a name of an ingredient | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | At least how many cups of graham cracker crumbs does the recipe "Raspberry Chiffon Pie" need? | 'graham cracker crumbs' is a name of an ingredient; 'Raspberry Chiffon Pie' refers to title | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | How many calories from fat are there in the recipe "Raspberry Chiffon Pie"? | calories from fat refers to MULTIPLY(calories, pcnt_cal_fat)||'%; Raspberry Chiffon Pie refers to title | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | How many calories on average does a recipe that comes from "Produce for Better Health Foundation and 5 a Day" contain? | Produce for Better Health Foundation and 5 a Day is a source of recipe; calculation = DIVIDE(SUM(calories), COUNT(recipe_id)) | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | How many calories does the turkey tenderloin bundles recipe have? | turkey tenderloin refers to title | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | How many cups of 1% lowfat milk should be added to no.1436 recipe? | 1% lowfat milk is a name of an ingredient; no.1436 recipe refers to recipe_id = 1436; max_qty = min_qty | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | Which recipe in the database contains the most total fat? Give its title. | the most total fat refers to MAX(total_fat) | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | How many times do seedless red grapes appear in the recipes? | seedless red grapes is a name of an ingredient | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | State the name of the optional ingredient of no.1397 recipe. | no.1397 recipe refers to recipe_id = 1397; optional ingredient refers to optional = 'TRUE' | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | Which recipe needs the most frozen raspberries in light syrup? State its title. | frozen raspberries in light syrup is a name of an ingredient; max_qty = min_qty | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | Give the name of the most widely used ingredient. | the most widely used ingredient refers to MAX(COUNT(ingredient_id)) | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | What kind of preparation is needed for apple juice to make a raspberry-pear couscous cake? | apple juice is a name of an ingredient; raspberry-pear couscous cake refers to title | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | How many cups of almonds do you need for a chicken pocket sandwich? | cups is a unit; almonds is a name of an ingredient; chicken pocket sandwich refers to title | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | Name the recipe with the most Vitamin C. | the most Vitamin C refers to MAX(vitamin_c) | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | How much Vitamin A is in Sherry beef? | Sherry beef refers to title = 'Sherried Beef' | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | State the title of the recipe with most kinds of ingredients. | the most kinds of ingredients refers to MAX(COUNT(recipe_id)) | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | How many times is the sodium content in Lasagne-Spinach Spirals to Beef and Spinach Pita Pockets? | 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)) | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | What is the average calorie count for all recipes using coarsely ground black pepper? | coarsely ground black pepper is a name of an ingredient; calculation = AVG(calories) | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | What are the names of the recipes that will cause stomach pain? | cause stomach pain refers to iron > 20 | SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.iron > 20 | database name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | How many ingredients are there in Apricot Yogurt Parfaits? | Apricot Yogurt Parfaits refers to title | 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 name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | What are the names of the ingredients that need to be cook in beef broth? | 'cook in beef broth' refers to a preparation | 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' | database name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | How many ingredients are there in the recipe that is best in helping your body's natural defence against illness and infection? | best in helping your body's natural defence against illness and infection refers to MAX(vitamin_a); | SELECT COUNT(*) FROM Nutrition AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.vitamin_a > 0 | database name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | What are the names of the top 5 recipes that are best for wound healing? | names of the recipes refers to title; best for wound healing refers to MAX(vitamin_c) | SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id ORDER BY T2.vitamin_c DESC LIMIT 5 | database name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | Which ingredient appeared the least in recipes? | ingredient appeared the least in recipes refers to MIN(ingredient_id) | SELECT T1.name FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id GROUP BY T2.ingredient_id ORDER BY COUNT(T2.ingredient_id) ASC LIMIT 1 | database name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | How many baking product ingredients are there in the No-Bake Chocolate Cheesecake? | baking product is a category; No-Bake Chocolate Cheesecake refers to title; | SELECT COUNT(*) FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T3.category = 'baking products' AND T1.title = 'No-Bake Chocolate Cheesecake' | database name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | List all the ingredients for Strawberry Sorbet. | Strawberry Sorbet refers to title | SELECT T3.name FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T1.title = 'Strawberry Sorbet' | database name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | What are the optional ingredients for Warm Chinese Chicken Salad? | optional refers to optional = 'TRUE'; Warm Chinese Chicken Salad refers to title | SELECT T3.name FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T1.title = 'Warm Chinese Chicken Salad' AND T2.optional = 'TRUE' | database name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|
cookbook | Among the recipes with alcohol content over 10, which recipe takes the longest to prepare? | with alcohol content over 10 refers to alcohol > 10; takes the longest to prepare refers to MAX(prep_min) | SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.alcohol > 10 ORDER BY T1.prep_min DESC LIMIT 1 | database name:db_id cookbook
Ingredient table Ingredient Cols: ingredient id dtype integer, category dtype text, name dtype text, plural dtype text,
Recipe table Recipe Cols: recipe id dtype integer, title dtype text, subtitle dtype text, servings dtype integer, yield unit dtype text, preparation minute dtype integer, cooked minute dtype integer, stand minute dtype integer, source dtype text, introduction dtype text, directions dtype text,
Nutrition table Nutrition Cols: recipe id dtype integer, protein dtype real, carbo dtype real, alcohol dtype real, total fat dtype real, saturated fat dtype real, cholesterol dtype real, sodium dtype real, iron dtype real, vitamin c dtype real, vitamin a dtype real, fiber dtype real, percentage calculation carbo dtype real, percentage calculation fat dtype real, percentage calculation protein dtype real, calories dtype real,
Quantity table Quantity Cols: quantity id dtype integer, recipe id dtype integer, ingredient id dtype integer, maximum quantity dtype real, minimum quantity dtype real, unit dtype text, preparation dtype text, optional dtype text,
|