messages
listlengths
3
3
system
stringclasses
1 value
user
stringlengths
473
37.6k
assistant
stringlengths
23
804
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE address_status\n(\n status_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE address_status ( status_id INTEGER primary key, address_status TEXT ) CREATE TABLE author ( author_id INTEGER primary key, author_name TEXT ) CREATE TABLE book_language ( language_id INTEGER primary key, language_cod...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE address_status\n(\n status_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE address_status ( status_id INTEGER primary key, address_status TEXT ) CREATE TABLE author ( author_id INTEGER primary key, author_name TEXT ) CREATE TABLE book_language ( language_id INTEGER primary key, language_cod...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE address_status\n(\n status_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE address_status ( status_id INTEGER primary key, address_status TEXT ) CREATE TABLE author ( author_id INTEGER primary key, author_name TEXT ) CREATE TABLE book_language ( language_id INTEGER primary key, language_cod...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE address_status\n(\n status_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE address_status ( status_id INTEGER primary key, address_status TEXT ) CREATE TABLE author ( author_id INTEGER primary key, author_name TEXT ) CREATE TABLE book_language ( language_id INTEGER primary key, language_cod...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE address_status\n(\n status_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE address_status ( status_id INTEGER primary key, address_status TEXT ) CREATE TABLE author ( author_id INTEGER primary key, author_name TEXT ) CREATE TABLE book_language ( language_id INTEGER primary key, language_cod...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE address_status\n(\n status_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE address_status ( status_id INTEGER primary key, address_status TEXT ) CREATE TABLE author ( author_id INTEGER primary key, author_name TEXT ) CREATE TABLE book_language ( language_id INTEGER primary key, language_cod...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE address_status\n(\n status_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE address_status ( status_id INTEGER primary key, address_status TEXT ) CREATE TABLE author ( author_id INTEGER primary key, author_name TEXT ) CREATE TABLE book_language ( language_id INTEGER primary key, language_cod...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE address_status\n(\n status_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE address_status ( status_id INTEGER primary key, address_status TEXT ) CREATE TABLE author ( author_id INTEGER primary key, author_name TEXT ) CREATE TABLE book_language ( language_id INTEGER primary key, language_cod...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE address_status\n(\n status_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE address_status ( status_id INTEGER primary key, address_status TEXT ) CREATE TABLE author ( author_id INTEGER primary key, author_name TEXT ) CREATE TABLE book_language ( language_id INTEGER primary key, language_cod...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE address_status\n(\n status_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE address_status ( status_id INTEGER primary key, address_status TEXT ) CREATE TABLE author ( author_id INTEGER primary key, author_name TEXT ) CREATE TABLE book_language ( language_id INTEGER primary key, language_cod...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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' )
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
SELECT point_level FROM inspection_point WHERE Description = 'Refrigeration and metal stem thermometers provided and conspicuous '
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
SELECT COUNT(employee_id) FROM employee WHERE zip = '60617'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
SELECT DISTINCT dba_name FROM establishment WHERE address = '2903 W IRVING PARK RD '
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
SELECT first_name, last_name FROM employee ORDER BY salary ASC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
SELECT COUNT(license_no) FROM establishment WHERE risk_level = 2 AND dba_name = 'HOMEMADE PIZZA'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
SELECT COUNT(inspection_id) FROM violation WHERE point_id = 3 AND fine = 500
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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' )
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
SELECT last_name FROM employee WHERE address = '7211 S Hermitage Ave' AND city = 'Chicago' AND state = 'IL'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
SELECT T1.title FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.inspection_id = 60332
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
SELECT COUNT(inspection_id) FROM inspection WHERE strftime('%Y-%m', inspection_date) = '2011-01'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
SELECT COUNT(inspection_id) FROM inspection WHERE strftime('%Y', inspection_date) = '2014' AND results = 'Fail'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
SELECT CAST(COUNT(CASE WHEN fine = 100 THEN inspection_id END) AS REAL) * 100 / COUNT(inspection_id) FROM violation
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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(...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
SELECT T1.address FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.inspection_id = 52238
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
SELECT T1.title FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.inspection_id = 52269
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE employee\n(\n employee_id INTEGER\n ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE employee ( employee_id INTEGER primary key, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER...
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'