Chinastark/bird_dataset huggingface dataset:
Database: books
Question: Which book has the most number of pages?
Evidence: books with the most number of pages refers to Max(num_pages)
SQL: SELECT title FROM book ORDER BY num_pages DESC LIMIT 1
Database: books
Question: How many books were written by author A.J. Ayer?
Evidence: "A.J. Ayer" is the author_name;
SQL: SELECT COUNT(*) FROM book_author AS T1 INNER JOIN author AS T2 ON T1.author_id = T2.author_id WHERE T2.author_name = 'A.J. Ayer'
Database: books
Question: Name the title of books written by author A.J.Ayer.
Evidence: "A.J. Ayer" is the author_name;
SQL: SELECT T3.title FROM book_author AS T1 INNER JOIN author AS T2 ON T1.author_id = T2.author_id INNER JOIN book AS T3 ON T3.book_id = T1.book_id WHERE T2.author_name = 'A.J. Ayer'
Database: books
Question: The book name "The Season: A Candid Look at Broadway" was published by which publisher?
Evidence: "The Season: A Candid Look at Broadway" is the  title of the book; publisher refers to publisher_name
SQL: SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T1.title = 'The Season: A Candid Look at Broadway'
Database: books
Question: What is the average of English books among all books published by Carole Marsh Mysteries?
Evidence: English book refers to language_name = 'English'; 'Carole Marsh Mysteries' is the publisher_name; average = Divide (Count(language_name = 'English'), Count(book_id))
SQL: SELECT CAST(SUM(CASE WHEN T1.language_name = 'English' THEN 1 ELSE 0 END) AS REAL) / 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 = 'Carole Marsh Mysteries'
Database: books
Question: Name the title of the book with the most number of pages that was published from 1990 to 2000 by publisher Free Press.
Evidence: books with the most number of pages refers to Max(num_pages); published from 1990 to 2000 refers to SUBSTR(publication_date, 1, 4) BETWEEN '1990' AND '2000'; 'Free Press' is the publisher_name
SQL: SELECT T1.title FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'Free Press' AND STRFTIME('%Y', T1.publication_date) BETWEEN '1990' AND '2000' ORDER BY T1.num_pages DESC LIMIT 1
Database: books
Question: What is the order price of the book "The Servant Leader" in 2003?
Evidence: "The Servant Leader" is the title of the book; book in 2003 refers to SUBSTR(publication_date, 1, 4) = '2003'
SQL: SELECT T2.price FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T1.title = 'The Servant Leader' AND STRFTIME('%Y', T1.publication_date) = '2003'
Database: books
Question: What is the current address of customer Kandy?
Evidence: current address refers to address_status = 1; address refers to street_number, street_name, city
SQL: SELECT T3.street_number, T3.street_name, T3.city FROM customer AS T1 INNER JOIN customer_address AS T2 ON T1.customer_id = T2.customer_id INNER JOIN address AS T3 ON T3.address_id = T2.address_id INNER JOIN address_status AS T4 ON T4.status_id = T2.status_id WHERE T1.first_name = 'Kandy'
Database: books
Question: How many books were ordered by customer Kandy Adamec?
SQL: SELECT COUNT(*) 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 T3.first_name = 'Kandy' AND T3.last_name = 'Adamec'
Database: books
Question: How many orders got returned in 2022?
Evidence: orders got returned refers to status_value = 'Returned'; in 2022 refers to SUBSTR(status_date, 1, 4) = '2022'
SQL: SELECT COUNT(*) FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id WHERE T1.status_value = 'Returned' AND STRFTIME('%Y', T2.status_date) = '2022'
Database: books
Question: Which country does the customer with the email "rturbitt2@geocities.jp" from?
Evidence: "rturbitt2@geocities.jp" is the email of customer; country refers to country_name
SQL: SELECT T4.country_name FROM customer AS T1 INNER JOIN customer_address AS T2 ON T1.customer_id = T2.customer_id INNER JOIN address AS T3 ON T3.address_id = T2.address_id INNER JOIN country AS T4 ON T4.country_id = T3.country_id WHERE T1.email = 'rturbitT2@geocities.jp'
Database: books
Question: Name the publisher who published the most books.
Evidence: published the most books refers to Max(Count(book_id)); publisher refers to publisher_name
SQL: SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id GROUP BY T2.publisher_name ORDER BY COUNT(T2.publisher_id) DESC LIMIT 1
Database: books
Question: What is the title of the first book that was written by A.J. Ayer?
Evidence: "A.J. Ayer" is the author_name; first book refers to Min(publication_date)
SQL: SELECT T1.title 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 WHERE T3.author_name = 'A.J. Ayer' ORDER BY T1.publication_date ASC LIMIT 1
Database: books
Question: What is the percentage of books that cost greater than $10 and were ordered by customer Ruthanne Vatini?
Evidence: cost greater than $10 refers to price > 10; percentage = Divide (Count(book_id where price >10), Count(book_id)) * 100; full name refers to the composition of first name, lastname
SQL: SELECT CAST(SUM(CASE WHEN T1.price > 10 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) 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 T3.first_name = 'Ruthanne' AND T3.last_name = 'Vatini'
Database: books
Question: List the title of books published by AK Press.
Evidence: "AK Press" is the publisher_name
SQL: SELECT T1.title FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'AK Press'
Database: books
Question: Who ordered the book with the cheapest price?
Evidence: book with cheapest price refers to Min(price); who order means name of customer which refers to first_name, last_name
SQL: SELECT T3.first_name, T3.last_name 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 ORDER BY T1.price ASC LIMIT 1
Database: books
Question: List down the ISBN of the books purchased by the customer with an email of fsier3e@ihg.com.
Evidence: "fsier3e@ihg.com" is the email of customer; ISBN refers to isbn13
SQL: SELECT T1.isbn13 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.email = 'fsier3e@ihg.com'
Database: books
Question: Give the author's name of the books that cost 19 dollars and above.
Evidence: books cost 19 dollars and above refers to price > = 19
SQL: SELECT DISTINCT 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 INNER JOIN order_line AS T4 ON T4.book_id = T1.book_id WHERE T4.price > 19
Database: books
Question: Provide the publisher name of the book with ISBN 76092025986.
Evidence: "76092025986" is the isbn13
SQL: SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T1.isbn13 = 76092025986
Database: books
Question: Among the books published by Birlinn in 2008, how many books have pages around 600 to 700?
Evidence: "Birlinn" is the publisher_name; books have pages around 600 to 700 refers to num_pages BETWEEN 600 AND 700; in 2008 refers to SUBSTR(publication_date, 1, 4) = '2008'
SQL: SELECT COUNT(*) FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'Birlinn' AND STRFTIME('%Y', T1.publication_date) = '2008' AND T1.num_pages BETWEEN 600 AND 700
Database: books
Question: What is the price of the book with ISBN 9780763628321?
Evidence: "9780763628321" is the isbn13
SQL: SELECT T2.price FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T1.isbn13 = 9780763628321
Database: books
Question: What is the number of pages of the book in the order ID 1167?
Evidence: number of pages refers to num_pages
SQL: SELECT T1.num_pages FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T2.order_id = 1167
Database: books
Question: Provide the title of the books published in British-English.
Evidence: "British English" is the language_name of the book
SQL: SELECT DISTINCT T1.title FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id WHERE T2.language_name = 'British English'
Database: books
Question: How many books were published by Brava in 2006?
Evidence: "Brava" is the publisher_name; in 2006 refers to SUBSTR(publication_date, 1, 4) = '2006'
SQL: SELECT COUNT(*) FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'Brava' AND STRFTIME('%Y', T1.publication_date) = '2006'
Database: books
Question: Provide the ISBN and price of the book with book ID 7160.
Evidence: ISBN refers to isbn13;
SQL: SELECT T1.isbn13, T2.price FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T2.book_id = 6503
Database: books
Question: What is the title of the book in the order ID 931?
SQL: 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
Database: books
Question: What is the language of the book titled Zorro?
Evidence: "Zorro" is the title of the book; langauge refers to language_name
SQL: 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'
Database: books
Question: Provide the email of the customers that purchased books with a price range of 3 to 5 dollars.
Evidence: books with a price range of 3 to 5 dollars refers to price BETWEEN 3 AND 5
SQL: 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
Database: books
Question: List the ISBN of the books that cost 7.5 dollars.
Evidence: ISBN refers to isbn13; books cost 7.5 dollars refers to price = 7.5
SQL: 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
Database: books
Question: Give the publisher's name of the books authored by Alan Lee.
Evidence: "Alan Lee" is the author_name; publisher's name refers to publisher_name
SQL: 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
Database: books
Question: What is the sum of the number of pages of the books ordered by Mick Sever?
Evidence: sum of the number of pages refers to Sum(num_pages)
SQL: 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'
Database: books
Question: Write down the author's name of the book most recently published.
Evidence: author's name refers to author_name; book most recently published refers to Max(publication_date)
SQL: 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
Database: books
Question: In books published by Ace Book, what is the percentage of English books published?
Evidence: "Ace Book" is the publisher_name; English book refers to language_name = 'English'; percentage = Divide (Count(book_id where language_name = 'English'), Count(book_id)) * 100
SQL: 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'
Database: books
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?
Evidence: book purchased by less than 1 dollar refers to price < 1; books with less than 500 pages refers to num_pages < 500; greater than 500 pages refers to num_pages > 500; Difference = Subtract (Count(book_id where num_pages < 500), Count(book_id where num_pages > 500))
SQL: 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
Database: books
Question: What are the language and title of the ordered books with price less than 20% of the average price of all ordered books?
Evidence: language refers to language_name; books with price less than 20% of the average price refers to price < Multiply (AVG(price), 0.2)
SQL: 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
Database: food_inspection_2
Question: Please list the full names of all the sanitarians under the supervision of Darlisha Jacobs.
Evidence: full name refers to first_name, last_name
SQL: 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' )
Database: food_inspection_2
Question: Please list the full names of the sanitarians who did at least one inspection in May, 2010.
Evidence: full name refers to first_name, last_name; in May 2010 refers to inspection_date like '2010-05%'; sanitarian refers to title = 'Sanitarian'
SQL: 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'
Database: food_inspection_2
Question: How many inspections were sanitarian Joshua Rosa responsible for in 2010?
Evidence: in 2010 refers to inspection_date like '2010%'
SQL: 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'
Database: food_inspection_2
Question: Please list the assumed name of all the facilities inspected by Joshua Rosa.
Evidence: assumed name refers to dba_name
SQL: 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'
Database: food_inspection_2
Question: Among the facilities that have undergone at least one inspection in 2010, how many of them are restaurants or cafeterias?
Evidence: in 2010 refers to inspection_date like '2010%'; restaurant or cafeteria refers to facility_type = 'Restaurant'
SQL: 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'
Database: food_inspection_2
Question: Please list the location coordinates of all the facilities that had an inspection on 2010/5/11.
Evidence: location coordinates refers to latitude, longitude; on 2010/5/11 refers to inspection_date = '2010-05-11'
SQL: 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'
Database: food_inspection_2
Question: Among the facilities that have undergone at least one inspection in 2010, how many of them are in ward no.42?
Evidence: in 2010 refers to inspection_date like '2010%'; in ward no.42 refers to ward = 42
SQL: 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
Database: food_inspection_2
Question: Please list the full names of all the sanitarians who have inspected the facility Burbank.
Evidence: full name refers to first_name, last_name; the facility Burbank refers to dba_name = 'Burbank'
SQL: 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'
Database: food_inspection_2
Question: Please list the assumed name of all the facilities that failed an inspection in 2010.
Evidence: assumed name refers to dba_name; failed an inspection refers to results = 'Fail'; in 2010 refers to inspection_date like '2010%'
SQL: 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'
Database: food_inspection_2
Question: What is the full name of the sanitarian who inspected Amundsen High School on 2010/5/11?
Evidence: full name refers to first_name, last_name;  Amundsen High School refers to dba_name = 'AMUNDSEN HIGH SCHOOL'; on 2010/5/11 refers to inspection_date = '2010-05-11'
SQL: 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'
Database: food_inspection_2
Question: Among the inspections done by sanitarian Joshua Rosa, how many of them have the result of "pass"?
Evidence: have the result of "pass" refers to results = 'Pass'
SQL: 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'
Database: food_inspection_2
Question: After Azha Restaurant Inc. passed the inspection on 2010/1/21, when was the follow-up inspection done?
Evidence: Azha Restaurant Inc. refers to dba_name = 'Azha Restaurant Inc.'; on 2010/1/21 refers to inspection_date = '2010-01-21'; follow-up inspection date refers to followup_to
SQL: 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'
Database: food_inspection_2
Question: Among the facilities that had undergone at least one inspection in 2010, how many of them have the most serious food safety issues?
Evidence: in 2010 refers to inspection_date like '2010%'; the most serious food safety issues refers to risk_level = 3
SQL: 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
Database: food_inspection_2
Question: What is the average number of inspections carried out in the year 2010 by a sanitarian whose salary is over 70000?
Evidence: in the year 2010 refers to inspection_date like '2010%'; salary is over 70000 refers to salary > 70000; average number = divide(sum(inspection where inspection_date like '2010%'), sum(employee_id where salary > 70000))
SQL: 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
Database: food_inspection_2
Question: What is the point level of "Refrigeration and metal stem thermometers provided and conspicuous"?
Evidence: "Refrigeration and metal stem thermometers provided and conspicuous" refers to Description = 'Refrigeration and metal stem thermometers provided and conspicuous '
SQL: SELECT point_level FROM inspection_point WHERE Description = 'Refrigeration and metal stem thermometers provided and conspicuous '
Database: food_inspection_2
Question: Which employee was responsible for inspection no.48224? Give the full name.
Evidence: inspection no.48224 refers to inspection_id = '48224'; full name refers to first_name, last_name;
SQL: 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
Database: food_inspection_2
Question: How many inspections did All Style Buffet Restaurant have?
Evidence: All Style Buffet refers to dba_name = 'All Style Buffet'; Restaurant refers to facility_type = 'Restaurant'
SQL: 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'
Database: food_inspection_2
Question: When did Wing Hung Chop Suey Restaurant have its first inspection?
Evidence: Wing Hung Chop Suey Restaurant refers to aka_name = 'WING HUNG CHOP SUEY RESTAURANT'; first inspection refers to min(inspection_date)
SQL: 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'
Database: food_inspection_2
Question: How many restaurants were inspected on 2015/5/8?
Evidence: restaurant refers to facility_type = 'Restaurant'; on 2015/5/8 refers to inspection_date = '2015-05-08'
SQL: 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'
Database: food_inspection_2
Question: How many "food maintenance" related violations did inspection no.1454071 have?
Evidence: "food maintenance" related refers to category = 'Food Maintenance'; inspection no.1454071 refers to inspection_id = '1454071'
SQL: 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'
Database: food_inspection_2
Question: State the number of violations did Royal Thai Cuisine has during the 2015/5/8 inspection.
Evidence: Royal Thai Cuisine refers to dba_name = 'ROYAL THAI CUISINE'; 2015/5/8 refers to inspection_date = '2015-05-08'
SQL: 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'
Database: food_inspection_2
Question: For the grocery store located at "3635 W DIVERSEY AVE", how many inspections did it have?
Evidence: grocery store refers to facility_type = 'Grocery Store'; "3635 W DIVERSEY AVE" refers to address = '3635 W DIVERSEY AVE'
SQL: 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'
Database: food_inspection_2
Question: Who is responsible for most of the inspections? Give the full name.
Evidence: full name refers to first_name, last_name; most of the inspections refers to max(count(employee_id))
SQL: 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