input
stringlengths
358
16.1k
output
stringlengths
24
805
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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;
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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;
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
SELECT COUNT(business_id) FROM businesses WHERE city = 'HAYWARD';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
SELECT COUNT(DISTINCT business_id) FROM inspections WHERE score < 50;
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
SELECT COUNT(business_id) FROM businesses WHERE STRFTIME('%Y', application_date) = '2012';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
SELECT COUNT(business_id) FROM inspections WHERE STRFTIME('%Y', `date`) = '2014' AND type = 'Foodborne Illness Investigation';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
SELECT COUNT(T1.owner_name) FROM ( SELECT owner_name FROM businesses GROUP BY owner_name HAVING COUNT(owner_name) > 5 ) T1;
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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;
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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;
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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 );
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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;
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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;
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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...
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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;
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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;
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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...
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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;
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
SELECT COUNT(DISTINCT business_id) FROM inspections WHERE STRFTIME('%Y', `date`) = '2013' AND score = ( SELECT MAX(score) FROM inspections WHERE STRFTIME('%Y', `date`) = '2013' );
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
SELECT business_id FROM inspections WHERE type = 'Structural Inspection' AND `date` LIKE '2016-02%';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
SELECT COUNT(DISTINCT business_id) FROM violations WHERE risk_category = 'Low Risk' AND description = 'Unpermitted food facility';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
SELECT business_id, risk_category, description FROM violations WHERE violation_type_id = '103101';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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;
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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;
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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;
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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;
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
SELECT COUNT(business_id) FROM businesses WHERE address = '1825 POST St #223' AND city = 'SAN FRANCISCO';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
SELECT DISTINCT owner_name FROM businesses WHERE owner_zip = '94104';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
SELECT COUNT(tax_code) FROM businesses WHERE tax_code = 'H25';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
SELECT COUNT(risk_category) FROM violations WHERE STRFTIME('%Y', `date`) = '2014' AND risk_category = 'Low Risk';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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.';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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;
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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;
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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;
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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;
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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';
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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 );
[INST] Here is a database schema: businesses : business_id [ INTEGER ] primary_key name [ TEXT ] address [ TEXT ] city [ TEXT ] postal_code [ TEXT ] latitude [ REAL ] longitude [ REAL ] phone_number [ INTEGER ] tax_code [ TEXT ] business_certificate [ INTEGER ] application_date [ DATE ] owner_name [ TEXT ] owner_addres...
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;
[INST] Here is a database schema: breweries : id [ INTEGER ] primary_key name [ TEXT ] city [ TEXT ] state [ TEXT ] beers : id [ INTEGER ] primary_key brewery_id [ INTEGER ] abv [ REAL ] ibu [ REAL ] name [ TEXT ] style [ TEXT ] ounces [ REAL ] Please write me a SQL statement that answers the following question: Whic...
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 );
[INST] Here is a database schema: breweries : id [ INTEGER ] primary_key name [ TEXT ] city [ TEXT ] state [ TEXT ] beers : id [ INTEGER ] primary_key brewery_id [ INTEGER ] abv [ REAL ] ibu [ REAL ] name [ TEXT ] style [ TEXT ] ounces [ REAL ] Please write me a SQL statement that answers the following question: Wher...
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;
[INST] Here is a database schema: breweries : id [ INTEGER ] primary_key name [ TEXT ] city [ TEXT ] state [ TEXT ] beers : id [ INTEGER ] primary_key brewery_id [ INTEGER ] abv [ REAL ] ibu [ REAL ] name [ TEXT ] style [ TEXT ] ounces [ REAL ] Please write me a SQL statement that answers the following question: What...
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;
[INST] Here is a database schema: breweries : id [ INTEGER ] primary_key name [ TEXT ] city [ TEXT ] state [ TEXT ] beers : id [ INTEGER ] primary_key brewery_id [ INTEGER ] abv [ REAL ] ibu [ REAL ] name [ TEXT ] style [ TEXT ] ounces [ REAL ] Please write me a SQL statement that answers the following question: Of a...
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';
[INST] Here is a database schema: breweries : id [ INTEGER ] primary_key name [ TEXT ] city [ TEXT ] state [ TEXT ] beers : id [ INTEGER ] primary_key brewery_id [ INTEGER ] abv [ REAL ] ibu [ REAL ] name [ TEXT ] style [ TEXT ] ounces [ REAL ] Please write me a SQL statement that answers the following question: Whic...
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;
[INST] Here is a database schema: breweries : id [ INTEGER ] primary_key name [ TEXT ] city [ TEXT ] state [ TEXT ] beers : id [ INTEGER ] primary_key brewery_id [ INTEGER ] abv [ REAL ] ibu [ REAL ] name [ TEXT ] style [ TEXT ] ounces [ REAL ] Please write me a SQL statement that answers the following question: When...
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';
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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;
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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';
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.sodium < 5;
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.iron > 20;
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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...
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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;
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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';
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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';
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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;
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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;
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
SELECT COUNT(*) FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id WHERE T1.name = 'graham cracker crumbs';
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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';
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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';
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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';
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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';
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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;
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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;
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
SELECT COUNT(*) FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id WHERE T1.name = 'seedless red grapes';
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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';
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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;
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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;
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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';
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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)';
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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;
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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';
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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;
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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;
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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';
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.iron > 20;
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
SELECT COUNT(*) FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Apricot Yogurt Parfaits';
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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';
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
SELECT COUNT(*) FROM Nutrition AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.vitamin_a > 0;
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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;
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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;
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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';
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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';
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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';
[INST] Here is a database schema: Ingredient : ingredient_id [ INTEGER ] primary_key category [ TEXT ] name [ TEXT ] plural [ TEXT ] Recipe : recipe_id [ INTEGER ] primary_key title [ TEXT ] subtitle [ TEXT ] servings [ INTEGER ] yield_unit [ TEXT ] prep_min [ INTEGER ] cook_min [ INTEGER ] stnd_min [ INTEGER ] source...
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;