db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
books | select t1.title from book as t1 inner join order_line as t2 on t1.book_id = t2.book_id where t2.order_id = 931 | Question: what is the title of the book in the order id 931? | Tables: address_status -> status_id, address_status. author -> author_id, author_name. book_language -> language_id, language_code, language_name. country -> country_id, country_name. address -> address_id, street_number, street_name, city, country_id. cust... | what is the title of the book in the order id 931? |
books | select t2.language_name from book as t1 inner join book_language as t2 on t1.language_id = t2.language_id where t1.title = 'zorro' | Question: what is the language of the book titled zorro? | Tables: address_status -> status_id, address_status. author -> author_id, author_name. book_language -> language_id, language_code, language_name. country -> country_id, country_name. address -> address_id, street_number, street_name, city, country_id. customer... | what is the language of the book titled zorro? |
books | select distinct t3.email from order_line as t1 inner join cust_order as t2 on t2.order_id = t1.order_id inner join customer as t3 on t3.customer_id = t2.customer_id where t1.price between 3 and 5 | Question: provide the email of the customers that purchased books with a price range of 3 to 5 dollars. | Tables: address_status -> status_id, address_status. author -> author_id, author_name. book_language -> language_id, language_code, language_name. country -> country_id, country_name. address -> address_id, street_... | provide the email of the customers that purchased books with a price range of 3 to 5 dollars. |
books | select t1.isbn13 from book as t1 inner join order_line as t2 on t1.book_id = t2.book_id where t2.price = 7.5 | Question: list the isbn of the books that cost 7.5 dollars. | Tables: address_status -> status_id, address_status. author -> author_id, author_name. book_language -> language_id, language_code, language_name. country -> country_id, country_name. address -> address_id, street_number, street_name, city, country_id. custo... | list the isbn of the books that cost 7.5 dollars. |
books | select t4.publisher_name from book as t1 inner join book_author as t2 on t1.book_id = t2.book_id inner join author as t3 on t3.author_id = t2.author_id inner join publisher as t4 on t4.publisher_id = t1.publisher_id where t3.author_name = 'alan lee' group by t4.publisher_name | Question: give the publisher's name of the books authored by alan lee. | Tables: address_status -> status_id, address_status. author -> author_id, author_name. book_language -> language_id, language_code, language_name. country -> country_id, country_name. address -> address_id, street_number, street_name, city, countr... | give the publisher's name of the books authored by alan lee. |
books | select sum(t1.num_pages) from book as t1 inner join order_line as t2 on t1.book_id = t2.book_id inner join cust_order as t3 on t3.order_id = t2.order_id inner join customer as t4 on t4.customer_id = t3.customer_id where t4.first_name = 'mick' and t4.last_name = 'sever' | Question: what is the sum of the number of pages of the books ordered by mick sever? | Tables: address_status -> status_id, address_status. author -> author_id, author_name. book_language -> language_id, language_code, language_name. country -> country_id, country_name. address -> address_id, street_number, street_name... | what is the sum of the number of pages of the books ordered by mick sever? |
books | select t3.author_name from book as t1 inner join book_author as t2 on t1.book_id = t2.book_id inner join author as t3 on t3.author_id = t2.author_id order by t1.publication_date desc limit 1 | Question: write down the author's name of the book most recently published. | Tables: address_status -> status_id, address_status. author -> author_id, author_name. book_language -> language_id, language_code, language_name. country -> country_id, country_name. address -> address_id, street_number, street_name, city, c... | write down the author's name of the book most recently published. |
books | select cast(sum(case when t1.language_name = 'english' then 1 else 0 end) as real) * 100 / count(*) from book_language as t1 inner join book as t2 on t1.language_id = t2.language_id inner join publisher as t3 on t3.publisher_id = t2.publisher_id where t3.publisher_name = 'ace book' | Question: in books published by ace book, what is the percentage of english books published? | Tables: address_status -> status_id, address_status. author -> author_id, author_name. book_language -> language_id, language_code, language_name. country -> country_id, country_name. address -> address_id, street_number, str... | in books published by ace book, what is the percentage of english books published? |
books | select sum(case when t1.num_pages < 500 then 1 else 0 end) - sum(case when t1.num_pages > 500 then 1 else 0 end) as dif from book as t1 inner join order_line as t2 on t1.book_id = t2.book_id where t2.price < 1 | Question: among the books purchased by less than 1 dollar, what is the difference between the number of books with less than 500 pages and books with greater than 500 pages? | Tables: address_status -> status_id, address_status. author -> author_id, author_name. book_language -> language_id, language_code, language_nam... | among the books purchased by less than 1 dollar, what is the difference between the number of books with less than 500 pages and books with greater than 500 pages? |
books | select distinct t3.language_name, t2.title from order_line as t1 inner join book as t2 on t1.book_id = t2.book_id inner join book_language as t3 on t3.language_id = t2.language_id where t1.price * 100 < ( select avg(price) from order_line ) * 20 | Question: what are the language and title of the ordered books with price less than 20% of the average price of all ordered books? | Tables: address_status -> status_id, address_status. author -> author_id, author_name. book_language -> language_id, language_code, language_name. country -> country_id, country_name. add... | what are the language and title of the ordered books with price less than 20% of the average price of all ordered books? |
food_inspection_2 | select first_name, last_name from employee where title = 'sanitarian' and supervisor = ( select employee_id from employee where first_name = 'darlisha' and last_name = 'jacobs' ) | Question: please list the full names of all the sanitarians under the supervision of darlisha jacobs. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, z... | please list the full names of all the sanitarians under the supervision of darlisha jacobs. |
food_inspection_2 | select distinct t1.first_name, t1.last_name from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id where strftime('%y-%m', t2.inspection_date) = '2010-05' and t1.title = 'sanitarian' | Question: please list the full names of the sanitarians who did at least one inspection in may, 2010. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, z... | please list the full names of the sanitarians who did at least one inspection in may, 2010. |
food_inspection_2 | select count(t2.inspection_id) from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id where strftime('%y', t2.inspection_date) = '2010' and t1.first_name = 'joshua' and t1.last_name = 'rosa' | Question: how many inspections were sanitarian joshua rosa responsible for in 2010? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, long... | how many inspections were sanitarian joshua rosa responsible for in 2010? |
food_inspection_2 | select distinct t3.dba_name from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id inner join establishment as t3 on t2.license_no = t3.license_no where t1.first_name = 'joshua' and t1.last_name = 'rosa' | Question: please list the assumed name of all the facilities inspected by joshua rosa. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, l... | please list the assumed name of all the facilities inspected by joshua rosa. |
food_inspection_2 | select count(distinct t1.license_no) from inspection as t1 inner join establishment as t2 on t1.license_no = t2.license_no where strftime('%y', t1.inspection_date) = '2010' and t2.facility_type = 'restaurant' | Question: among the facilities that have undergone at least one inspection in 2010, how many of them are restaurants or cafeterias? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_... | among the facilities that have undergone at least one inspection in 2010, how many of them are restaurants or cafeterias? |
food_inspection_2 | select distinct t2.latitude, t2.longitude from inspection as t1 inner join establishment as t2 on t1.license_no = t2.license_no where t1.inspection_date = '2010-05-11' | Question: please list the location coordinates of all the facilities that had an inspection on 2010/5/11. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, stat... | please list the location coordinates of all the facilities that had an inspection on 2010/5/11. |
food_inspection_2 | select count(distinct t1.license_no) from inspection as t1 inner join establishment as t2 on t1.license_no = t2.license_no where strftime('%y', t1.inspection_date) = '2010' and t2.ward = 42 | Question: among the facilities that have undergone at least one inspection in 2010, how many of them are in ward no.42? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, addre... | among the facilities that have undergone at least one inspection in 2010, how many of them are in ward no.42? |
food_inspection_2 | select distinct t1.first_name, t1.last_name from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id inner join establishment as t3 on t2.license_no = t3.license_no where t3.dba_name = 'burbank' and t1.title = 'sanitarian' | Question: please list the full names of all the sanitarians who have inspected the facility burbank. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zi... | please list the full names of all the sanitarians who have inspected the facility burbank. |
food_inspection_2 | select distinct t2.dba_name from inspection as t1 inner join establishment as t2 on t1.license_no = t2.license_no where t1.results = 'fail' and strftime('%y', t1.inspection_date) = '2010' | Question: please list the assumed name of all the facilities that failed an inspection in 2010. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, la... | please list the assumed name of all the facilities that failed an inspection in 2010. |
food_inspection_2 | select t1.first_name, t1.last_name from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id inner join establishment as t3 on t2.license_no = t3.license_no where t2.inspection_date = '2010-05-11' and t3.dba_name = 'amundsen high school' and t1.title = 'sanitarian' | Question: what is the full name of the sanitarian who inspected amundsen high school on 2010/5/11? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip,... | what is the full name of the sanitarian who inspected amundsen high school on 2010/5/11? |
food_inspection_2 | select count(t2.inspection_id) from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id where t2.results = 'pass' and t1.first_name = 'joshua' and t1.last_name = 'rosa' | Question: among the inspections done by sanitarian joshua rosa, how many of them have the result of 'pass'? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, st... | among the inspections done by sanitarian joshua rosa, how many of them have the result of 'pass'? |
food_inspection_2 | select t1.followup_to from inspection as t1 inner join establishment as t2 on t1.license_no = t2.license_no where t2.dba_name = 'azha restaurant inc.' and t1.results = 'pass' and t1.inspection_date = '2010-01-21' | Question: after azha restaurant inc. passed the inspection on 2010/1/21, when was the follow-up inspection done? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, cit... | after azha restaurant inc. passed the inspection on 2010/1/21, when was the follow-up inspection done? |
food_inspection_2 | select count(distinct t2.license_no) from inspection as t1 inner join establishment as t2 on t1.license_no = t2.license_no where strftime('%y', t1.inspection_date) = '2010' and t2.risk_level = 3 | Question: among the facilities that had undergone at least one inspection in 2010, how many of them have the most serious food safety issues? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_t... | among the facilities that had undergone at least one inspection in 2010, how many of them have the most serious food safety issues? |
food_inspection_2 | select cast(sum(case when t2.inspection_date like '2010%' then 1 else 0 end) as real) / sum(case when t1.salary > 70000 then 1 else 0 end) from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id | Question: what is the average number of inspections carried out in the year 2010 by a sanitarian whose salary is over 70000? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, ... | what is the average number of inspections carried out in the year 2010 by a sanitarian whose salary is over 70000? |
food_inspection_2 | select point_level from inspection_point where description = 'refrigeration and metal stem thermometers provided and conspicuous ' | Question: what is the point level of 'refrigeration and metal stem thermometers provided and conspicuous'? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, sta... | what is the point level of 'refrigeration and metal stem thermometers provided and conspicuous'? |
food_inspection_2 | select t2.first_name, t2.last_name from inspection as t1 inner join employee as t2 on t1.employee_id = t2.employee_id where t1.inspection_id = 48224 | Question: which employee was responsible for inspection no.48224? give the full name. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, lo... | which employee was responsible for inspection no.48224? give the full name. |
food_inspection_2 | select count(t2.inspection_id) from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t1.facility_type = 'restaurant' and t1.dba_name = 'all style buffet' | Question: how many inspections did all style buffet restaurant have? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. in... | how many inspections did all style buffet restaurant have? |
food_inspection_2 | select min(t2.inspection_date) from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t1.aka_name = 'wing hung chop suey restaurant' | Question: when did wing hung chop suey restaurant have its first inspection? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ... | when did wing hung chop suey restaurant have its first inspection? |
food_inspection_2 | select count(t2.license_no) from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t2.inspection_date = '2015-05-08' and t1.facility_type = 'restaurant' | Question: how many restaurants were inspected on 2015/5/8? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. inspection -... | how many restaurants were inspected on 2015/5/8? |
food_inspection_2 | select count(t2.point_id) from inspection_point as t1 inner join violation as t2 on t1.point_id = t2.point_id where t2.inspection_id = '1454071' and t1.category = 'food maintenance' | Question: how many 'food maintenance' related violations did inspection no.1454071 have? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude,... | how many 'food maintenance' related violations did inspection no.1454071 have? |
food_inspection_2 | select count(t3.point_id) from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no inner join violation as t3 on t2.inspection_id = t3.inspection_id where t2.inspection_date = '2015-05-08' and t1.dba_name = 'royal thai cuisine' | Question: state the number of violations did royal thai cuisine has during the 2015/5/8 inspection. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip... | state the number of violations did royal thai cuisine has during the 2015/5/8 inspection. |
food_inspection_2 | select count(t2.inspection_id) from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t1.address = '3635 w diversey ave ' and t1.facility_type = 'grocery store' | Question: for the grocery store located at '3635 w diversey ave', how many inspections did it have? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip... | for the grocery store located at '3635 w diversey ave', how many inspections did it have? |
food_inspection_2 | select t.first_name, t.last_name from ( select t2.employee_id, t2.first_name, t2.last_name, count(t1.inspection_id) from inspection as t1 inner join employee as t2 on t1.employee_id = t2.employee_id group by t2.employee_id, t2.first_name, t2.last_name order by count(t1.inspection_id) desc limit 1 ) as t | Question: who is responsible for most of the inspections? give the full name. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude,... | who is responsible for most of the inspections? give the full name. |
food_inspection_2 | select count(t1.inspection_id) from inspection as t1 inner join employee as t2 on t1.employee_id = t2.employee_id where t2.first_name = 'lisa' and t2.last_name = 'tillman' and t1.results = 'out of business' | Question: how many inspections done by lisa tillman ended up with the result of 'out of business'? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip,... | how many inspections done by lisa tillman ended up with the result of 'out of business'? |
food_inspection_2 | select count(t1.inspection_id) from inspection as t1 inner join employee as t2 on t1.employee_id = t2.employee_id where t2.address = '5000 n wolcott ave' and t2.title = 'sanitarian' and strftime('%y-%m', t1.inspection_date) = '2011-05' | Question: for the sanitarian who lives on 5000 n wolcott ave, how many establishments did he/she inspect in the may of 2011? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, ... | for the sanitarian who lives on 5000 n wolcott ave, how many establishments did he/she inspect in the may of 2011? |
food_inspection_2 | select t2.phone from inspection as t1 inner join employee as t2 on t1.employee_id = t2.employee_id where t1.inspection_id = 634597 and t2.title = 'sanitarian' | Question: show the phone number of the sanitarian who was responsible for inspection no.634597. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, la... | show the phone number of the sanitarian who was responsible for inspection no.634597. |
food_inspection_2 | select t1.salary from employee as t1 inner join ( select t.employee_id, count(t.inspection_id) from inspection as t group by t.employee_id order by count(t.inspection_id) desc limit 1 ) as t2 on t1.employee_id = t2.employee_id | Question: state the salary of the employee who did the most inspections. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward... | state the salary of the employee who did the most inspections. |
food_inspection_2 | select cast(count(t2.inspection_id) as real) / count(distinct t1.license_no) from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t1.risk_level = 3 and t1.facility_type = 'tavern' | Question: what is the average number of inspections did risk level 3 taverns have? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longi... | what is the average number of inspections did risk level 3 taverns have? |
food_inspection_2 | select cast(count(case when t2.results = 'pass' then t2.inspection_id else null end) as real) * 100 / count(t2.inspection_id) from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t1.dba_name = 'pockets' and t1.facility_type = 'restaurant' | Question: state the inspection pass rate of pockets restaurant. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. inspect... | state the inspection pass rate of pockets restaurant. |
food_inspection_2 | select count(employee_id) from employee where zip = '60617' | Question: how many sanitarian employees in chicago are from the zip code 60617? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitud... | how many sanitarian employees in chicago are from the zip code 60617? |
food_inspection_2 | select distinct dba_name from establishment where address = '2903 w irving park rd ' | Question: what is the assumed name of the business located at 2903 w irving park rd? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, lon... | what is the assumed name of the business located at 2903 w irving park rd? |
food_inspection_2 | select first_name, last_name from employee order by salary asc limit 1 | Question: what is the full name of the employee with the lowest salary? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward.... | what is the full name of the employee with the lowest salary? |
food_inspection_2 | select count(license_no) from establishment where risk_level = 2 and dba_name = 'homemade pizza' | Question: how many establishments that are doing business as homemade pizza have a risk level of 2? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip... | how many establishments that are doing business as homemade pizza have a risk level of 2? |
food_inspection_2 | select count(inspection_id) from violation where point_id = 3 and fine = 500 | Question: how many inspections with critical food safety problems are under inspection point id 3? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip,... | how many inspections with critical food safety problems are under inspection point id 3? |
food_inspection_2 | select count(t1.employee_id) from employee as t1 where t1.supervisor = ( select employee_id from employee where first_name = 'gregory' and last_name = 'cardenas' ) | Question: how many employees are under gregory cardenas? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. inspection -> ... | how many employees are under gregory cardenas? |
food_inspection_2 | select min(t2.inspection_date) from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t1.dba_name = 'renaldi''s pizza' | Question: when did renaldi's pizza had its first inspection? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. inspection... | when did renaldi's pizza had its first inspection? |
food_inspection_2 | select t3.first_name, t3.last_name from ( select t1.employee_id, count(t1.inspection_id) from inspection as t1 where strftime('%y-%m', t1.inspection_date) = '2016-03' group by t1.employee_id order by count(t1.inspection_id) desc limit 1 ) as t2 inner join employee as t3 on t2.employee_id = t3.employee_id | Question: what is the full name of the employee who was responsible for the most inspection in march 2016? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, sta... | what is the full name of the employee who was responsible for the most inspection in march 2016? |
food_inspection_2 | select distinct t2.dba_name from inspection as t1 inner join establishment as t2 on t1.license_no = t2.license_no where strftime('%y-%m', t1.inspection_date) = '2012-05' and t1.results = 'pass w/ conditions' | Question: what are the names of the businesses that passed with conditions in may 2012? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, ... | what are the names of the businesses that passed with conditions in may 2012? |
food_inspection_2 | select count(distinct t2.license_no) from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id where t1.first_name = 'david' and t1.last_name = 'hodges' and t1.employee_id = 153225 and t2.inspection_type = 'short form complaint' and t2.results = 'pass' | Question: out of all the short form complaint inspections done by david hodges, how many businesses passed? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, st... | out of all the short form complaint inspections done by david hodges, how many businesses passed? |
food_inspection_2 | select count(distinct t1.license_no) from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t2.inspection_date between '2010-01-01' and '2015-12-31' and t1.ward = 42 and t1.license_no in ( select license_no from ( select license_no from inspection where results = 'fail' group by lic... | Question: how many businesses from ward 42 have at least 5 failed inspection results between 1/1/2010 to 12/31/2015? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address,... | how many businesses from ward 42 have at least 5 failed inspection results between 1/1/2010 to 12/31/2015? |
food_inspection_2 | select t1.salary from employee as t1 inner join ( select employee_id, count(inspection_id) from inspection group by employee_id order by count(inspection_id) desc limit 1 ) as t2 on t1.employee_id = t2.employee_id | Question: how much is the salary of the employee who has the highest number of inspections done of all time? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, s... | how much is the salary of the employee who has the highest number of inspections done of all time? |
food_inspection_2 | select t.dba_name from ( select t1.dba_name, sum(t3.fine) from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no inner join violation as t3 on t2.inspection_id = t3.inspection_id where strftime('%y', t2.inspection_date) = '2014' group by t1.dba_name order by sum(t3.fine) desc limit 1 ) as... | Question: what is the assumed name of the business that has the highest total fine in 2014? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitu... | what is the assumed name of the business that has the highest total fine in 2014? |
food_inspection_2 | select t1.latitude, t1.longitude from establishment as t1 inner join ( select license_no from inspection where results = 'fail' group by license_no order by count(results) desc limit 1 ) as t2 on t1.license_no = t2.license_no | Question: what is the precise location of the establishment with the highest number of failed inspections? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, sta... | what is the precise location of the establishment with the highest number of failed inspections? |
food_inspection_2 | select t3.inspector_comment from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no inner join violation as t3 on t2.inspection_id = t3.inspection_id where t2.inspection_date = '2010-01-25' and t1.dba_name = 'taqueria la fiesta' | Question: what are the comments of the inspector during the inspection of taqueria la fiesta on 1/25/2010? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, sta... | what are the comments of the inspector during the inspection of taqueria la fiesta on 1/25/2010? |
food_inspection_2 | select sum(t3.fine) from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no inner join violation as t3 on t2.inspection_id = t3.inspection_id where strftime('%y-%m', t2.inspection_date) = '2014-02' and t1.dba_name = 'ron of japan inc' | Question: how much is the total fine given to ron of japan inc in its inspection done on february 2014? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state,... | how much is the total fine given to ron of japan inc in its inspection done on february 2014? |
food_inspection_2 | select distinct t3.first_name, t3.last_name from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no inner join employee as t3 on t2.employee_id = t3.employee_id where t1.dba_name = 'taqueria la paz' | Question: list the full names of the employees who were responsible for inspecting taqueria la paz. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip... | list the full names of the employees who were responsible for inspecting taqueria la paz. |
food_inspection_2 | select t.first_name, t.last_name from ( select t1.first_name, t1.last_name, sum(t3.fine) from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id inner join violation as t3 on t2.inspection_id = t3.inspection_id group by t1.first_name, t1.last_name order by sum(t3.fine) desc limit 1 ) t | Question: what is the full name of the employee who gave the highest amount of fine of all time? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, l... | what is the full name of the employee who gave the highest amount of fine of all time? |
food_inspection_2 | select cast(count(distinct t2.inspection_id) as real) / 5, t1.first_name, t1.last_name from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id where t1.title = 'sanitarian' order by t1.salary desc limit 5 | Question: what is the average number of inspections done by the top 5 employees with the highest salary? list the names of the said employees. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_... | what is the average number of inspections done by the top 5 employees with the highest salary? list the names of the said employees. |
food_inspection_2 | select t2.dba_name , cast(sum(case when t1.results = 'pass' then 1 else 0 end) as real) * 100 / count(t1.inspection_id) as percentagepassed , cast(sum(case when t1.results = 'fail' then 1 else 0 end) as real) * 100 / count(t1.inspection_id) from inspection as t1 inner join establishment as t2 on t1.license_no = t2.lice... | Question: which business had the highest number of inspections done? calculate the percentage of passed and failed inspections of the said business. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, fac... | which business had the highest number of inspections done? calculate the percentage of passed and failed inspections of the said business. |
food_inspection_2 | select last_name from employee where address = '7211 s hermitage ave' and city = 'chicago' and state = 'il' | Question: what is the employee's last name at 7211 s hermitage ave, chicago, il? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitu... | what is the employee's last name at 7211 s hermitage ave, chicago, il? |
food_inspection_2 | select t1.dba_name, t3.first_name, t3.last_name from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no inner join employee as t3 on t2.employee_id = t3.employee_id where t2.inspection_date = '2010-05-05' and t2.inspection_id = 44256 | Question: what is the establishment's name and employee involved in the inspection id 44256 on may 5, 2010? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, st... | what is the establishment's name and employee involved in the inspection id 44256 on may 5, 2010? |
food_inspection_2 | select distinct t1.address from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where strftime('%y-%m', t2.inspection_date) = '2010-03' and t2.results = 'pass' and t1.facility_type = 'school' | Question: give the address of the schools that passed the inspection in march 2010. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, long... | give the address of the schools that passed the inspection in march 2010. |
food_inspection_2 | select distinct t1.first_name, t1.last_name from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id where t2.inspection_date = '2010-03-09' and t2.inspection_type = 'canvass' | Question: what is the employee's full name involved in the canvass inspection type on march 09, 2010? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, z... | what is the employee's full name involved in the canvass inspection type on march 09, 2010? |
food_inspection_2 | select distinct t2.inspection_id from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t1.dba_name = 'pizza rustica, inc' | Question: provide the inspection id of the establishment named 'pizza rustica, inc.' | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, lon... | provide the inspection id of the establishment named 'pizza rustica, inc.' |
food_inspection_2 | select count(distinct t1.license_no) from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t1.risk_level = 3 and t2.results = 'pass' and t1.facility_type = 'restaurant' | Question: how many restaurants with the highest risk level still passed the inspection? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, ... | how many restaurants with the highest risk level still passed the inspection? |
food_inspection_2 | select distinct t1.first_name, t1.last_name from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id inner join violation as t3 on t2.inspection_id = t3.inspection_id inner join inspection_point as t4 on t3.point_id = t4.point_id where t4.category = 'display of inspection report summary' | Question: list the names of employees involved in an inspection with the display of inspection report summary category. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, addre... | list the names of employees involved in an inspection with the display of inspection report summary category. |
food_inspection_2 | select t1.title from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id where t2.inspection_id = 60332 | Question: what is the title of the employee involved in inspection id 60332? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ... | what is the title of the employee involved in inspection id 60332? |
food_inspection_2 | select count(distinct t1.license_no) from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t1.risk_level = '1' and t2.inspection_type = 'complaint' and t1.facility_type = 'restaurant' and t2.results = 'fail' | Question: how many of the restaurants with the lowest risk level failed the complaint inspection type? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, ... | how many of the restaurants with the lowest risk level failed the complaint inspection type? |
food_inspection_2 | select distinct t3.fine, t1.state, t1.city, t1.address from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no inner join violation as t3 on t2.inspection_id = t3.inspection_id where t2.inspection_id = 48216 | Question: provide the fine paid and the complete address of the establishment with inspection id 48216. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state,... | provide the fine paid and the complete address of the establishment with inspection id 48216. |
food_inspection_2 | select t2.inspection_id from inspection_point as t1 inner join violation as t2 on t1.point_id = t2.point_id where t2.fine = 500 and t1.point_level = 'critical' and t2.inspector_comment = 'cdi on 5-17-10' | Question: what is the inspection id of the inspection with critical point level, $500 fine, and inspector comment 'cdi on 5-17-10'? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_... | what is the inspection id of the inspection with critical point level, $500 fine, and inspector comment 'cdi on 5-17-10'? |
food_inspection_2 | select t1.description, t2.inspector_comment from inspection_point as t1 inner join violation as t2 on t1.point_id = t2.point_id where t2.inspection_id = 44247 | Question: what are the inspection description and inspector's comments in the inspection id 164795? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip... | what are the inspection description and inspector's comments in the inspection id 164795? |
food_inspection_2 | select t2.inspector_comment, t1.code from inspection_point as t1 inner join violation as t2 on t1.point_id = t2.point_id where t2.inspection_id = 54216 and t2.point_id = 34 | Question: what are the inspector's comments and clean operating requirement code for inspection id 54216 and point id 34? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, add... | what are the inspector's comments and clean operating requirement code for inspection id 54216 and point id 34? |
food_inspection_2 | select cast(count(case when t1.risk_level = 3 then t1.license_no end) as real) * 100 / count(t1.risk_level) from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t2.results = 'fail' | Question: among the establishments that failed in the inspection, what is the percentage of establishments with the highest risk level? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, r... | among the establishments that failed in the inspection, what is the percentage of establishments with the highest risk level? |
food_inspection_2 | select sum(case when t3.fine = 100 then 1 else 0 end) - sum(case when t3.fine = 500 then 1 else 0 end) from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id inner join violation as t3 on t2.inspection_id = t3.inspection_id where t1.salary between 75000 and 80000 | Question: among the employees that receive a salary between $75000 to $85000, what is the difference between the number of employees which undergone an inspection that fined 100 and 500? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment ... | among the employees that receive a salary between $75000 to $85000, what is the difference between the number of employees which undergone an inspection that fined 100 and 500? |
food_inspection_2 | select count(inspection_id) from inspection where strftime('%y-%m', inspection_date) = '2011-01' | Question: how many inspections were done in january 2011? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. inspection ->... | how many inspections were done in january 2011? |
food_inspection_2 | select count(inspection_id) from inspection where strftime('%y', inspection_date) = '2014' and results = 'fail' | Question: how many inspections failed in 2014? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. inspection -> inspection... | how many inspections failed in 2014? |
food_inspection_2 | select cast(count(case when fine = 100 then inspection_id end) as real) * 100 / count(inspection_id) from violation | Question: calculate the percentage of inspections with the fine for a minor food safety problem. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, l... | calculate the percentage of inspections with the fine for a minor food safety problem. |
food_inspection_2 | select t2.point_id, t2.fine from inspection as t1 inner join violation as t2 on t1.inspection_id = t2.inspection_id where t1.inspection_date = '2010-08-07' | Question: list the point ids and fines of the inspections done on 7th august 2010. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longi... | list the point ids and fines of the inspections done on 7th august 2010. |
food_inspection_2 | select count(t1.inspection_id) from violation as t1 inner join inspection_point as t2 on t1.point_id = t2.point_id where t2.category = 'personnel' | Question: how many inspections were done under the personnel category? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. ... | how many inspections were done under the personnel category? |
food_inspection_2 | select distinct t1.dba_name, t2.results from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t1.city = 'burnham' | Question: provide the names and inspection results of the facilities located in burnham. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude,... | provide the names and inspection results of the facilities located in burnham. |
food_inspection_2 | select count(case when t2.category = 'toxic items' then t1.inspection_id end) as tox_nums , count(case when t2.category = 'no smoking regulations' then t1.inspection_id end) as nosmonums from violation as t1 inner join inspection_point as t2 on t1.point_id = t2.point_id | Question: compare the number of inspections under toxic items and no-smoking regulations. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude... | compare the number of inspections under toxic items and no-smoking regulations. |
food_inspection_2 | select distinct t1.dba_name from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no inner join employee as t3 on t2.employee_id = t3.employee_id where t2.inspection_date = '2012-11-20' and t3.first_name = 'sarah' and t3.last_name = 'lindsey' | Question: which facilities were inspected by sarah lindsey on 20th november 2012? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longit... | which facilities were inspected by sarah lindsey on 20th november 2012? |
food_inspection_2 | select distinct t4.category, t3.fine from inspection as t1 inner join employee as t2 on t1.employee_id = t2.employee_id inner join violation as t3 on t1.inspection_id = t3.inspection_id inner join inspection_point as t4 on t3.point_id = t4.point_id where t2.first_name = 'lisa' and t2.last_name = 'tillman' and strftime(... | Question: provide the categories and fines for the inspections done by lisa tillman in january 2014. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zi... | provide the categories and fines for the inspections done by lisa tillman in january 2014. |
food_inspection_2 | select count(t2.inspection_id) from inspection_point as t1 inner join violation as t2 on t1.point_id = t2.point_id where t1.category = 'display of inspection report summary' | Question: how many inspections were done under the display of inspection report summary category? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, ... | how many inspections were done under the display of inspection report summary category? |
food_inspection_2 | select t2.inspection_type, t2.results from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t1.facility_type = 'riverwalk cafe' | Question: list the types and results of the inspections done on riverwalk caf. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude... | list the types and results of the inspections done on riverwalk caf. |
food_inspection_2 | select t3.first_name, t3.last_name, t2.results from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no inner join employee as t3 on t2.employee_id = t3.employee_id where t1.dba_name = 'jean samocki' | Question: who inspected jean samocki and what was the result? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. inspectio... | who inspected jean samocki and what was the result? |
food_inspection_2 | select sum(t3.fine) from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no inner join violation as t3 on t2.inspection_id = t3.inspection_id where t1.dba_name = 'hacienda los torres' and t1.ward = 36 and t2.results = 'fail' | Question: how much did hacienda los torres from ward 36 fine for failing an inspection? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, ... | how much did hacienda los torres from ward 36 fine for failing an inspection? |
food_inspection_2 | select sum(t2.fine) from inspection_point as t1 inner join violation as t2 on t1.point_id = t2.point_id where t1.category = 'food equipment and utensil' | Question: calculate the total amount of fine under the food equipment and utensil category. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitu... | calculate the total amount of fine under the food equipment and utensil category. |
food_inspection_2 | select t2.dba_name, t2.longitude, t2.latitude from inspection as t1 inner join establishment as t2 on t1.license_no = t2.license_no where t1.inspection_date = '2013-07-29' and t1.results = 'fail' | Question: provide the names and locations of the facilities that failed inspections on 29th july 2013. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, ... | provide the names and locations of the facilities that failed inspections on 29th july 2013. |
food_inspection_2 | select cast(count(case when t2.results like '%pass%' then t2.inspection_id end) as real) * 100 / count(t2.inspection_id), count(distinct t2.license_no) from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t1.city = 'chicago' | Question: calculate the percentage of inspections with verified quality. among them, how many businesses were from chicago? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, a... | calculate the percentage of inspections with verified quality. among them, how many businesses were from chicago? |
food_inspection_2 | select cast(count(case when t1.first_name = 'jessica' and t1.last_name = 'anthony' then t2.inspection_id else 0 end) as real) / 8 from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id where strftime('%y', t2.inspection_date) between '2010' and '2017' | Question: calculate the average inspections per year done by jessica anthony from 2010 to 2017. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, la... | calculate the average inspections per year done by jessica anthony from 2010 to 2017. |
food_inspection_2 | select t1.first_name from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id where t2.inspection_id = 48225 | Question: provide the first name of employee who did inspection id 48225? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, war... | provide the first name of employee who did inspection id 48225? |
food_inspection_2 | select t1.address from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id where t2.inspection_id = 52238 | Question: tell the address of employee who did inspection id 52238? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. ins... | tell the address of employee who did inspection id 52238? |
food_inspection_2 | select t1.last_name from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id where t2.inspection_id = 52238 | Question: write down the last name of employee who did inspection id 52238? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, w... | write down the last name of employee who did inspection id 52238? |
food_inspection_2 | select distinct t2.results from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id where t1.first_name = 'thomas' and t1.last_name = 'langley' | Question: what is the inspection result for inspection done by thomas langley? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude... | what is the inspection result for inspection done by thomas langley? |
food_inspection_2 | select distinct t1.address from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id where t2.inspection_date = '2010-11-05' | Question: list down the address of employees who did inspection dated 11/5/2010. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitu... | list down the address of employees who did inspection dated 11/5/2010. |
food_inspection_2 | select distinct t1.phone from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id where t2.inspection_type = 'canvass' | Question: list down the phone numbers of employees who did canvass inspection. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude... | list down the phone numbers of employees who did canvass inspection. |
food_inspection_2 | select t1.title from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id where t2.inspection_id = 52269 | Question: what is the job title of employee who did inspection id 52269? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward... | what is the job title of employee who did inspection id 52269? |
food_inspection_2 | select distinct t2.results from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t1.dba_name = 'xando coffee & bar / cosi sandwich bar' | Question: what are the inspection results for xando coffee & bar / cosi sandwich bar? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, lo... | what are the inspection results for xando coffee & bar / cosi sandwich bar? |
food_inspection_2 | select distinct t2.inspection_type from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t1.dba_name = 'john schaller' | Question: what type of inspection was done at john schaller? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. inspection... | what type of inspection was done at john schaller? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.