db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
food_inspection
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
Question: for the business which got the most number of violations, how many inspections did it have? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip....
for the business which got the most number of violations, how many inspections did it have?
food_inspection
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'
Question: for the business whose business certificate number is 304977, how many violations did it have on 2013/10/7? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_s...
for the business whose business certificate number is 304977, how many violations did it have on 2013/10/7?
food_inspection
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
Question: what is the average score for 'chairman bao' in all its unscheduled routine inspections? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. in...
what is the average score for 'chairman bao' in all its unscheduled routine inspections?
food_inspection
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'
Question: what percentage of the violations for 'melody lounge' are moderate risks? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspections -> bu...
what percentage of the violations for 'melody lounge' are moderate risks?
food_inspection
select count(business_id) from businesses where city = 'hayward'
Question: how many eateries are located in hayward? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspections -> business_id, score, date, type. vi...
how many eateries are located in hayward?
food_inspection
select count(distinct business_id) from inspections where score < 50
Question: how many establishments have an inspection score of no more than 50? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspections -> busines...
how many establishments have an inspection score of no more than 50?
food_inspection
select count(business_id) from businesses where strftime('%y', application_date) = '2012'
Question: how many eateries applied in 2012? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspections -> business_id, score, date, type. violation...
how many eateries applied in 2012?
food_inspection
select count(business_id) from inspections where strftime('%y', `date`) = '2014' and type = 'foodborne illness investigation'
Question: how many foodborne illness investigations were done in 2014? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspections -> business_id, sc...
how many foodborne illness investigations were done in 2014?
food_inspection
select count(t1.owner_name) from ( select owner_name from businesses group by owner_name having count(owner_name) > 5 ) t1
Question: how many owners have 5 or more establishments? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspections -> business_id, score, date, typ...
how many owners have 5 or more establishments?
food_inspection
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
Question: what are the names of the establishments that met all of the required standards in 2013? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. in...
what are the names of the establishments that met all of the required standards in 2013?
food_inspection
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
Question: in 2016, which city has the highest number of establishments with the highest health and safety hazards? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_stat...
in 2016, which city has the highest number of establishments with the highest health and safety hazards?
food_inspection
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 )
Question: what is the name of the establishment with the lowest inspection score of all time? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspect...
what is the name of the establishment with the lowest inspection score of all time?
food_inspection
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'
Question: how many high risks violations did the tiramisu kitchen violate? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspections -> business_id...
how many high risks violations did the tiramisu kitchen violate?
food_inspection
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
Question: how many establishments with the tax code h24 have complaint inspections of 5 or more? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. insp...
how many establishments with the tax code h24 have complaint inspections of 5 or more?
food_inspection
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'
Question: in 2013, what are the names of the establishments with contaminated or adulterated food? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. in...
in 2013, what are the names of the establishments with contaminated or adulterated food?
food_inspection
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
Question: among the establishments with a postal code of 94102, how many establishments have a score of 90 or more in 2015? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, o...
among the establishments with a postal code of 94102, how many establishments have a score of 90 or more in 2015?
food_inspection
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 b...
Question: what are the names of the establishments that met all the required standards for 4 consecutive years? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, ...
what are the names of the establishments that met all the required standards for 4 consecutive years?
food_inspection
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'
Question: between 2014 to 2016, what is the average inpsection score of the establishment owned by yiu tim chan in 808 pacific ave, san francisco? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner...
between 2014 to 2016, what is the average inpsection score of the establishment owned by yiu tim chan in 808 pacific ave, san francisco?
food_inspection
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
Question: what is the average score of the establishments owned by the owner with the highest number of establishments? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner...
what is the average score of the establishments owned by the owner with the highest number of establishments?
food_inspection
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
Question: what is the name of the establishment with the highest number of low risk violations in 2014? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zi...
what is the name of the establishment with the highest number of low risk violations in 2014?
food_inspection
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 = t...
Question: 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. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owne...
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.
food_inspection
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
Question: which establishment has the highest number of inspections done? give the name of the establishment and calculate for its average score per inspection. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, own...
which establishment has the highest number of inspections done? give the name of the establishment and calculate for its average score per inspection.
food_inspection
select count(distinct business_id) from inspections where strftime('%y', `date`) = '2013' and score = ( select max(score) from inspections where strftime('%y', `date`) = '2013' )
Question: how many eateries got highest inspection in 2013? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspections -> business_id, score, date, ...
how many eateries got highest inspection in 2013?
food_inspection
select business_id from inspections where type = 'structural inspection' and `date` like '2016-02%'
Question: list down the eateries' ids with structural inspection type in february 2016. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspections -...
list down the eateries' ids with structural inspection type in february 2016.
food_inspection
select count(distinct business_id) from violations where risk_category = 'low risk' and description = 'unpermitted food facility'
Question: how many eateries had low risk for violation with unpermitted food facility description? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. in...
how many eateries had low risk for violation with unpermitted food facility description?
food_inspection
select business_id, risk_category, description from violations where violation_type_id = '103101'
Question: provide eateries' ids, risk categories and descriptions with violation id of 103101. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspec...
provide eateries' ids, risk categories and descriptions with violation id of 103101.
food_inspection
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
Question: when did eateries from san bruno city get highest score in inspection? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspections -> busin...
when did eateries from san bruno city get highest score in inspection?
food_inspection
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'
Question: describe the inspection types and violation descriptions under moderate risk category for art's caf. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, o...
describe the inspection types and violation descriptions under moderate risk category for art's caf.
food_inspection
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'
Question: mention the violation type id and description of high risk category for starbucks. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspecti...
mention the violation type id and description of high risk category for starbucks.
food_inspection
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'
Question: list the inspection dates, scores and inspection types for the eateries with tax code aa. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. i...
list the inspection dates, scores and inspection types for the eateries with tax code aa.
food_inspection
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'
Question: provide eateries' ids, names and addresses which were inspected on 30th july, 2016. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspect...
provide eateries' ids, names and addresses which were inspected on 30th july, 2016.
food_inspection
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'
Question: describe the violation dates, risk categories, descriptions and names of the eateries under jade chocolates llc. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, ow...
describe the violation dates, risk categories, descriptions and names of the eateries under jade chocolates llc.
food_inspection
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'
Question: provide the names, risk categories and descriptions for the eateries with violation type id of 103111. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state,...
provide the names, risk categories and descriptions for the eateries with violation type id of 103111.
food_inspection
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
Question: among violations on 3rd june, 2014, describe any 5 names, located cities and tax codes of the eateries with high risk category. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address,...
among violations on 3rd june, 2014, describe any 5 names, located cities and tax codes of the eateries with high risk category.
food_inspection
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
Question: what was the inspection type when el aji peruvian restaurant got highest inspection score? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. ...
what was the inspection type when el aji peruvian restaurant got highest inspection score?
food_inspection
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'
Question: who were the owners of eateries which had highest health hazard by improper cooking time or temperatures? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_sta...
who were the owners of eateries which had highest health hazard by improper cooking time or temperatures?
food_inspection
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'
Question: list the eateries' names and addresses which had reinspection on 2nd february, 2015. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspec...
list the eateries' names and addresses which had reinspection on 2nd february, 2015.
food_inspection
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
Question: list the names and business certificates of the eateries which got inspection score under 50. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zi...
list the names and business certificates of the eateries which got inspection score under 50.
food_inspection
select count(business_id) from businesses where address = '1825 post st #223' and city = 'san francisco'
Question: how many of the businesses are located at 1825 post st #223, san francisco? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspections -> ...
how many of the businesses are located at 1825 post st #223, san francisco?
food_inspection
select distinct owner_name from businesses where owner_zip = '94104'
Question: list down the owner's name with a zip code 94104. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspections -> business_id, score, date, ...
list down the owner's name with a zip code 94104.
food_inspection
select count(tax_code) from businesses where tax_code = 'h25'
Question: what is the total number of businesses with a tax code h25? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspections -> business_id, sco...
what is the total number of businesses with a tax code h25?
food_inspection
select count(risk_category) from violations where strftime('%y', `date`) = '2014' and risk_category = 'low risk'
Question: in the violations in 2014, how many of them have a low risk category? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspections -> busine...
in the violations in 2014, how many of them have a low risk category?
food_inspection
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.'
Question: give the business id and risk category of the business owned by san francisco madeleine, inc. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zi...
give the business id and risk category of the business owned by san francisco madeleine, inc.
food_inspection
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
Question: list owner's name of businesses with a 100 score. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspections -> business_id, score, date, ...
list owner's name of businesses with a 100 score.
food_inspection
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'
Question: among the businesses within the postal code 94117, what is total number of businesses with a high risk category? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, ow...
among the businesses within the postal code 94117, what is total number of businesses with a high risk category?
food_inspection
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
Question: among the businesses with score that ranges from 70 to 80, list their violation type id and risk category. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_st...
among the businesses with score that ranges from 70 to 80, list their violation type id and risk category.
food_inspection
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'
Question: list the tax code and inspection type of the business named 'rue lepic'. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspections -> bus...
list the tax code and inspection type of the business named 'rue lepic'.
food_inspection
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'
Question: in businesses that violates 103157 on may 27, 2016 , what is the name of the business that has an unscheduled inspection? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner...
in businesses that violates 103157 on may 27, 2016 , what is the name of the business that has an unscheduled inspection?
food_inspection
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'
Question: who is the owner of the business that has a high risk violation of 103109 and described as unclean or unsanitary food contact surfaces? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_...
who is the owner of the business that has a high risk violation of 103109 and described as unclean or unsanitary food contact surfaces?
food_inspection
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
Question: among the owners from cameron park, what is the business name of the business with a score of 100? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, own...
among the owners from cameron park, what is the business name of the business with a score of 100?
food_inspection
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'
Question: list the violation type id of business with business id from 30 to 50 and located at 747 irving st, san francisco. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, ...
list the violation type id of business with business id from 30 to 50 and located at 747 irving st, san francisco.
food_inspection
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'
Question: what is the owner's name of the of the business that violates 103156 on june 12, 2014? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. insp...
what is the owner's name of the of the business that violates 103156 on june 12, 2014?
food_inspection
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
Question: in businesses with an owner address 500 california st, 2nd floor of silicon valley, list the type of inspection of the business with the highest score. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, ow...
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.
food_inspection
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'
Question: among the violations in 2016, how many of them have unscheduled inspections? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, owner_city, owner_state, owner_zip. inspections ->...
among the violations in 2016, how many of them have unscheduled inspections?
food_inspection
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 )
Question: list the business' name and risk category of businesses with a score greater than the 80% of average score of all businesses. | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_date, owner_name, owner_address, o...
list the business' name and risk category of businesses with a score greater than the 80% of average score of all businesses.
food_inspection
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
Question: in businesses with a score lower than 95 and located around the postal code of 94110, what is the percentage of businesses with a risk category of low risk? | Tables: businesses -> business_id, name, address, city, postal_code, latitude, longitude, phone_number, tax_code, business_certificate, application_dat...
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?
craftbeer
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 )
Question: which distinct state makes beer that has the least amount of bitterness? | Tables: breweries -> id, name, city, state. beers -> id, brewery_id, abv, ibu, name, style, ounces. | Joins:
which distinct state makes beer that has the least amount of bitterness?
craftbeer
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
Question: where in new york can you locate the brewery that makes the bitterest beer? list both the brewery's name and the name of the city. | Tables: breweries -> id, name, city, state. beers -> id, brewery_id, abv, ibu, name, style, ounces. | Joins:
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.
craftbeer
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
Question: what is the average alcohol content per 12-ounce beer bottle produced by boston beer company? | Tables: breweries -> id, name, city, state. beers -> id, brewery_id, abv, ibu, name, style, ounces. | Joins:
what is the average alcohol content per 12-ounce beer bottle produced by boston beer company?
craftbeer
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'
Question: of all the beer styles produced by stevens point brewery, how many percent do they allot for american adjunct lager? | Tables: breweries -> id, name, city, state. beers -> id, brewery_id, abv, ibu, name, style, ounces. | Joins:
of all the beer styles produced by stevens point brewery, how many percent do they allot for american adjunct lager?
craftbeer
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
Question: which city and state produces the most and least bitter beer, and what is the difference in bitterness between the two? list also the names of the beer. | Tables: breweries -> id, name, city, state. beers -> id, brewery_id, abv, ibu, name, style, ounces. | Joins:
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.
craftbeer
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'
Question: when compared to the total number of breweries in the us producing american blonde ale, how many in the state of wisconsin produces american blonde ale? indicate your answer in percentage (%). | Tables: breweries -> id, name, city, state. beers -> id, brewery_id, abv, ibu, name, style, ounces. | Joins:
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 (%).
cookbook
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
Question: what is the title of the recipe that is most likely to gain weight? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_fat, sa...
what is the title of the recipe that is most likely to gain weight?
cookbook
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'
Question: what is the unsaturated fat content in the recipe 'raspberry chiffon pie'? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_...
what is the unsaturated fat content in the recipe 'raspberry chiffon pie'?
cookbook
select t1.title from recipe as t1 inner join nutrition as t2 on t1.recipe_id = t2.recipe_id where t2.sodium < 5
Question: please list the titles of all the recipes that are salt/sodium-free. | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_fat, s...
please list the titles of all the recipes that are salt/sodium-free.
cookbook
select t1.title from recipe as t1 inner join nutrition as t2 on t1.recipe_id = t2.recipe_id where t2.iron > 20
Question: please list the titles of all the recipes that may lead to constipation, feeling sick or stomach pain. | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, pro...
please list the titles of all the recipes that may lead to constipation, feeling sick or stomach pain.
cookbook
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
Question: which recipe is more beneficial in wound healing, 'raspberry chiffon pie' or 'fresh apricot bavarian'? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, pro...
which recipe is more beneficial in wound healing, 'raspberry chiffon pie' or 'fresh apricot bavarian'?
cookbook
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
Question: among the recipes that take more than 10 minutes to prepare, what is the title of the one with the most calories? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> rec...
among the recipes that take more than 10 minutes to prepare, what is the title of the one with the most calories?
cookbook
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'
Question: how many calories does the recipe 'raspberry chiffon pie' contain? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_fat, sat...
how many calories does the recipe 'raspberry chiffon pie' contain?
cookbook
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'
Question: is the ingredient 'graham cracker crumbs' optional in the recipe 'raspberry chiffon pie'? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, ...
is the ingredient 'graham cracker crumbs' optional in the recipe 'raspberry chiffon pie'?
cookbook
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
Question: how many ingredients must be rationed in the recipe 'raspberry chiffon pie'? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, tota...
how many ingredients must be rationed in the recipe 'raspberry chiffon pie'?
cookbook
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
Question: please list the names of all the ingredients needed for the recipe 'raspberry chiffon pie' that do not need preprocessing. | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutriti...
please list the names of all the ingredients needed for the recipe 'raspberry chiffon pie' that do not need preprocessing.
cookbook
select count(*) from ingredient as t1 inner join quantity as t2 on t1.ingredient_id = t2.ingredient_id where t1.name = 'graham cracker crumbs'
Question: how many recipes include the ingredient 'graham cracker crumbs'? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_fat, sat_f...
how many recipes include the ingredient 'graham cracker crumbs'?
cookbook
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'
Question: at least how many cups of graham cracker crumbs does the recipe 'raspberry chiffon pie' need? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, car...
at least how many cups of graham cracker crumbs does the recipe 'raspberry chiffon pie' need?
cookbook
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'
Question: how many calories from fat are there in the recipe 'raspberry chiffon pie'? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total...
how many calories from fat are there in the recipe 'raspberry chiffon pie'?
cookbook
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'
Question: how many calories on average does a recipe that comes from 'produce for better health foundation and 5 a day' contain? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -...
how many calories on average does a recipe that comes from 'produce for better health foundation and 5 a day' contain?
cookbook
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'
Question: how many calories does the turkey tenderloin bundles recipe have? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_fat, sat_...
how many calories does the turkey tenderloin bundles recipe have?
cookbook
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
Question: how many cups of 1% lowfat milk should be added to no.1436 recipe? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_fat, sat...
how many cups of 1% lowfat milk should be added to no.1436 recipe?
cookbook
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
Question: which recipe in the database contains the most total fat? give its title. | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_f...
which recipe in the database contains the most total fat? give its title.
cookbook
select count(*) from ingredient as t1 inner join quantity as t2 on t1.ingredient_id = t2.ingredient_id where t1.name = 'seedless red grapes'
Question: how many times do seedless red grapes appear in the recipes? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_fat, sat_fat, ...
how many times do seedless red grapes appear in the recipes?
cookbook
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'
Question: state the name of the optional ingredient of no.1397 recipe. | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_fat, sat_fat, ...
state the name of the optional ingredient of no.1397 recipe.
cookbook
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
Question: which recipe needs the most frozen raspberries in light syrup? state its title. | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, t...
which recipe needs the most frozen raspberries in light syrup? state its title.
cookbook
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
Question: give the name of the most widely used ingredient. | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_fat, sat_fat, cholestrl, ...
give the name of the most widely used ingredient.
cookbook
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'
Question: what kind of preparation is needed for apple juice to make a raspberry-pear couscous cake? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo,...
what kind of preparation is needed for apple juice to make a raspberry-pear couscous cake?
cookbook
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)'
Question: how many cups of almonds do you need for a chicken pocket sandwich? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_fat, sa...
how many cups of almonds do you need for a chicken pocket sandwich?
cookbook
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
Question: name the recipe with the most vitamin c. | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_fat, sat_fat, cholestrl, sodium, i...
name the recipe with the most vitamin c.
cookbook
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'
Question: how much vitamin a is in sherry beef? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_fat, sat_fat, cholestrl, sodium, iron...
how much vitamin a is in sherry beef?
cookbook
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
Question: state the title of the recipe with most kinds of ingredients. | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_fat, sat_fat,...
state the title of the recipe with most kinds of ingredients.
cookbook
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
Question: how many times is the sodium content in lasagne-spinach spirals to beef and spinach pita pockets? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein,...
how many times is the sodium content in lasagne-spinach spirals to beef and spinach pita pockets?
cookbook
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'
Question: what is the average calorie count for all recipes using coarsely ground black pepper? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alco...
what is the average calorie count for all recipes using coarsely ground black pepper?
cookbook
select t1.title from recipe as t1 inner join nutrition as t2 on t1.recipe_id = t2.recipe_id where t2.iron > 20
Question: what are the names of the recipes that will cause stomach pain? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_fat, sat_fa...
what are the names of the recipes that will cause stomach pain?
cookbook
select count(*) from recipe as t1 inner join quantity as t2 on t1.recipe_id = t2.recipe_id where t1.title = 'apricot yogurt parfaits'
Question: how many ingredients are there in apricot yogurt parfaits? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_fat, sat_fat, ch...
how many ingredients are there in apricot yogurt parfaits?
cookbook
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'
Question: what are the names of the ingredients that need to be cook in beef broth? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_f...
what are the names of the ingredients that need to be cook in beef broth?
cookbook
select count(*) from nutrition as t1 inner join quantity as t2 on t1.recipe_id = t2.recipe_id where t1.vitamin_a > 0
Question: how many ingredients are there in the recipe that is best in helping your body's natural defence against illness and infection? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nu...
how many ingredients are there in the recipe that is best in helping your body's natural defence against illness and infection?
cookbook
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
Question: what are the names of the top 5 recipes that are best for wound healing? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_fa...
what are the names of the top 5 recipes that are best for wound healing?
cookbook
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
Question: which ingredient appeared the least in recipes? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_fat, sat_fat, cholestrl, so...
which ingredient appeared the least in recipes?
cookbook
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'
Question: how many baking product ingredients are there in the no-bake chocolate cheesecake? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol...
how many baking product ingredients are there in the no-bake chocolate cheesecake?
cookbook
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'
Question: list all the ingredients for strawberry sorbet. | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_fat, sat_fat, cholestrl, so...
list all the ingredients for strawberry sorbet.
cookbook
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'
Question: what are the optional ingredients for warm chinese chicken salad? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo, alcohol, total_fat, sat_...
what are the optional ingredients for warm chinese chicken salad?
cookbook
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
Question: among the recipes with alcohol content over 10, which recipe takes the longest to prepare? | Tables: Ingredient -> ingredient_id, category, name, plural. Recipe -> recipe_id, title, subtitle, servings, yield_unit, prep_min, cook_min, stnd_min, source, intro, directions. Nutrition -> recipe_id, protein, carbo,...
among the recipes with alcohol content over 10, which recipe takes the longest to prepare?