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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT COUNT(business_id) FROM Business WHERE city = 'Mesa' AND active = 'true'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT COUNT(business_id) FROM Business WHERE stars IN (1, 2)
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT business_id FROM Business WHERE stars > 3 AND city = 'Paradise Valley' AND review_count = 'Low'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT COUNT(business_id) FROM Business_Attributes WHERE attribute_value > 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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT COUNT(business_id) FROM Business_Hours WHERE opening_time = '8AM' AND closing_time = '6PM'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T2.review_votes_funny = 'Uber' AND T1.active = 'true'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT COUNT(T2.user_id) FROM Users_Compliments AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id WHERE T1.number_of_compliments = 'High' AND T2.user_fans = 'None'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT T2.compliment_type FROM Users_Compliments AS T1 INNER JOIN Compliments AS T2 ON T1.compliment_id = T2.compliment_id GROUP BY T2.compliment_type ORDER BY COUNT(T2.compliment_type) 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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT T2.user_average_stars FROM Tips AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id GROUP BY T2.user_id ORDER BY SUM(T1.likes) DESC LIMIT 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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT T1.category_name FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T3.city = 'Arcadia'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT T1.business_id FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id WHERE T1.day_id = 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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT COUNT(T2.business_id) FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T1.attribute_name = 'music_karaoke' AND T3.active = 'false' AND T2.attribute_value IN ('none', 'no', 'false')
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT COUNT(DISTINCT T2.business_id) FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T1.review_length = 'Long' AND T2.active = 'true' AND T2.city = 'Phoenix'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT COUNT(DISTINCT T1.user_id) FROM Users AS T1 INNER JOIN Reviews AS T2 ON T1.user_id = T2.user_id WHERE T1.user_votes_cool = 'Low' AND T2.review_votes_cool = 'Low'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT COUNT(DISTINCT T1.user_id) FROM Users AS T1 INNER JOIN Tips AS T2 ON T1.user_id = T2.user_id WHERE T2.tip_length = 'Long' AND T2.likes = 2 AND T1.user_fans = 'High'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT COUNT(T2.business_id) FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T1.attribute_name = 'ambience_trendy' AND T2.attribute_value IN ('none', 'no', 'false')
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT COUNT(DISTINCT T2.business_id) FROM Business AS T1 INNER JOIN Business_hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T1.city = 'Scottsdale' AND T3.day_of_week = 'Sunday' AND T2.opening_time = '12PM'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT CAST(SUM(T1.stars) AS REAL) / COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T3.category_name = 'Obstetricians & Gynecologists'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT CAST(SUM(CASE WHEN T3.user_fans = 'High' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.user_fans) FROM Years AS T1 INNER JOIN Elite AS T2 ON T1.year_id = T2.year_id INNER JOIN Users AS T3 ON T2.user_id = T3.user_id WHERE T1.actual_year = 2011
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT COUNT(business_id) FROM Business WHERE city = 'Surprise'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT business_id FROM Business WHERE review_count = 'High' AND city = 'Tempe'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT COUNT(business_id) FROM Business WHERE review_count = 'Medium' AND state = 'AZ' AND active = 'true'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT business_id FROM Business WHERE stars >= 3 AND stars < 6 AND city = 'Chandler'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT COUNT(user_id) FROM Users WHERE user_yelping_since_year >= 2009 AND user_yelping_since_year < 2012 AND user_fans = 'Low'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT review_length FROM Reviews WHERE user_id = 11021 AND business_id = 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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT DISTINCT T3.attribute_name FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id INNER JOIN Attributes AS T3 ON T2.attribute_id = T3.attribute_id WHERE T1.city = 'Tempe' AND T1.review_count = 'Medium'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT COUNT(DISTINCT T1.business_id) FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T3.category_name = 'Food' AND T1.stars < 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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT DISTINCT T1.business_id, T1.stars FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T3.category_name = 'Food' AND T1.active = 'true'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT DISTINCT T3.category_name, T5.attribute_name FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id INNER JOIN Business_Attributes AS T4 ON T2.business_id = T4.business_id INNER JOIN Attributes AS T5 ON T4.attribu...
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT DISTINCT T3.category_name FROM Reviews AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T2.business_id >= 7 AND T2.business_id < 15 AND T1.review_length = 'Short' AND T1.review_stars = ( SELECT MAX(review_stars) FRO...
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT COUNT(DISTINCT T1.business_id) FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id INNER JOIN Attributes AS T3 ON T2.attribute_id = T3.attribute_id WHERE T3.attribute_name = 'BYOB' AND T1.review_count = 'High' AND T1.active = 'true'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT T2.opening_time, T2.closing_time FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Glendale' ORDER BY T1.stars 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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT T3.category_name, T5.attribute_name FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id INNER JOIN Business_Attributes AS T4 ON T1.business_id = T4.business_id INNER JOIN Attributes AS T5 ON T4.attribute_id = 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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT DISTINCT T3.category_name FROM Business_Categories AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T1.category_id = T3.category_id WHERE T2.active = 'true' AND T2.state = 'AZ' AND T2.city = 'Glendale'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT DISTINCT T1.city FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T2.opening_time = '7AM' AND T2.closing_time = '7PM' AND T3.day_of_week = 'Wednesday'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT DISTINCT T2.attribute_value FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id INNER JOIN Attributes AS T3 ON T2.attribute_id = T3.attribute_id WHERE T1.state = 'AZ' AND T1.city = 'Goodyear' AND T1.active = 'true' AND T1.stars = 3 AND T1.review_count = 'Low'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT DISTINCT T2.opening_time FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T1.city = 'Glendale' AND T1.review_count = 'Medium' AND T1.active = 'true'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT CAST(SUM(CASE WHEN T1.stars > 3 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.stars) FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T3.category_name = 'Food'
[ { "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 Attributes\n(\n attribute_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 Attributes ( attribute_id INTEGER constraint Attributes_pk primary key, attribute_name TEXT ) CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT ) CREATE TABLE Compliments (...
SELECT DISTINCT T2.closing_time, T3.day_of_week FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T1.active = 'true' AND T1.city = 'Goodyear' AND T1.stars > ( SELECT AVG(stars) * 0.8 FROM Business WHERE active = 'true' AND city = ...
[ { "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 cites\n(\n cited_paper_id TEXT not null,\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 cites ( cited_paper_id TEXT not null, citing_paper_id TEXT not null, primary key (cited_paper_id, citing_paper_id) ) CREATE TABLE paper ( paper_id TEXT not null primary key, class_label TEXT not null ) CREATE TABLE content ( paper_id TEXT not n...
SELECT CAST(COUNT(CASE WHEN class_label = 'Agents' THEN paper_id ELSE NULL END) AS REAL) * 100 / COUNT(paper_id) FROM paper
[ { "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 cites\n(\n cited_paper_id TEXT not null,\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 cites ( cited_paper_id TEXT not null, citing_paper_id TEXT not null, primary key (cited_paper_id, citing_paper_id) ) CREATE TABLE paper ( paper_id TEXT not null primary key, class_label TEXT not null ) CREATE TABLE content ( paper_id TEXT not n...
SELECT word_cited_id, COUNT(paper_id) FROM content GROUP BY word_cited_id ORDER BY COUNT(word_cited_id) 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 cites\n(\n cited_paper_id TEXT not null,\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 cites ( cited_paper_id TEXT not null, citing_paper_id TEXT not null, primary key (cited_paper_id, citing_paper_id) ) CREATE TABLE paper ( paper_id TEXT not null primary key, class_label TEXT not null ) CREATE TABLE content ( paper_id TEXT not n...
SELECT COUNT(DISTINCT T2.word_cited_id) FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id WHERE T1.class_label = 'AI'
[ { "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 cites\n(\n cited_paper_id TEXT not null,\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 cites ( cited_paper_id TEXT not null, citing_paper_id TEXT not null, primary key (cited_paper_id, citing_paper_id) ) CREATE TABLE paper ( paper_id TEXT not null primary key, class_label TEXT not null ) CREATE TABLE content ( paper_id TEXT not n...
SELECT T1.class_label, T2.word_cited_id FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id WHERE T1.paper_id = 315017
[ { "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 cites\n(\n cited_paper_id TEXT not null,\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 cites ( cited_paper_id TEXT not null, citing_paper_id TEXT not null, primary key (cited_paper_id, citing_paper_id) ) CREATE TABLE paper ( paper_id TEXT not null primary key, class_label TEXT not null ) CREATE TABLE content ( paper_id TEXT not n...
SELECT T2.word_cited_id FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id WHERE T1.class_label = 'DB' GROUP BY T2.word_cited_id ORDER BY COUNT(T2.word_cited_id) 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 cites\n(\n cited_paper_id TEXT not null,\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 cites ( cited_paper_id TEXT not null, citing_paper_id TEXT not null, primary key (cited_paper_id, citing_paper_id) ) CREATE TABLE paper ( paper_id TEXT not null primary key, class_label TEXT not null ) CREATE TABLE content ( paper_id TEXT not n...
SELECT CAST(COUNT(DISTINCT CASE WHEN T1.class_label = 'Agents' THEN T2.word_cited_id ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T2.word_cited_id) FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_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 cites\n(\n cited_paper_id TEXT not null,\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 cites ( cited_paper_id TEXT not null, citing_paper_id TEXT not null, primary key (cited_paper_id, citing_paper_id) ) CREATE TABLE paper ( paper_id TEXT not null primary key, class_label TEXT not null ) CREATE TABLE content ( paper_id TEXT not n...
SELECT T1.paper_id, T1.class_label FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id GROUP BY T1.paper_id, T1.class_label ORDER BY COUNT(T2.word_cited_id) 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 cites\n(\n cited_paper_id TEXT not null,\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 cites ( cited_paper_id TEXT not null, citing_paper_id TEXT not null, primary key (cited_paper_id, citing_paper_id) ) CREATE TABLE paper ( paper_id TEXT not null primary key, class_label TEXT not null ) CREATE TABLE content ( paper_id TEXT not n...
SELECT T1.paper_id, T1.class_label FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id WHERE T2.word_cited_id = 'word1002'
[ { "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 cites\n(\n cited_paper_id TEXT not null,\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 cites ( cited_paper_id TEXT not null, citing_paper_id TEXT not null, primary key (cited_paper_id, citing_paper_id) ) CREATE TABLE paper ( paper_id TEXT not null primary key, class_label TEXT not null ) CREATE TABLE content ( paper_id TEXT not n...
SELECT DISTINCT T2.word_cited_id FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id WHERE T1.class_label = 'AI'
[ { "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 cites\n(\n cited_paper_id TEXT not null,\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 cites ( cited_paper_id TEXT not null, citing_paper_id TEXT not null, primary key (cited_paper_id, citing_paper_id) ) CREATE TABLE paper ( paper_id TEXT not null primary key, class_label TEXT not null ) CREATE TABLE content ( paper_id TEXT not n...
SELECT DISTINCT T1.class_label, COUNT(T2.word_cited_id) FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id WHERE T1.paper_id = 'chakrabarti01integrating' GROUP BY T1.class_label
[ { "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 cites\n(\n cited_paper_id TEXT not null,\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 cites ( cited_paper_id TEXT not null, citing_paper_id TEXT not null, primary key (cited_paper_id, citing_paper_id) ) CREATE TABLE paper ( paper_id TEXT not null primary key, class_label TEXT not null ) CREATE TABLE content ( paper_id TEXT not n...
SELECT DISTINCT T1.paper_id, T1.class_label FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id GROUP BY T2.paper_id, T1.class_label HAVING COUNT(T2.word_cited_id) > 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 cites\n(\n cited_paper_id TEXT not null,\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 cites ( cited_paper_id TEXT not null, citing_paper_id TEXT not null, primary key (cited_paper_id, citing_paper_id) ) CREATE TABLE paper ( paper_id TEXT not null primary key, class_label TEXT not null ) CREATE TABLE content ( paper_id TEXT not n...
SELECT DISTINCT T2.word_cited_id FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id WHERE T1.class_label = 'AI' OR T1.class_label = 'IR'
[ { "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 cites\n(\n cited_paper_id TEXT not null,\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 cites ( cited_paper_id TEXT not null, citing_paper_id TEXT not null, primary key (cited_paper_id, citing_paper_id) ) CREATE TABLE paper ( paper_id TEXT not null primary key, class_label TEXT not null ) CREATE TABLE content ( paper_id TEXT not n...
SELECT cited_paper_id, COUNT(cited_paper_id), ( SELECT cited_paper_id FROM cites GROUP BY cited_paper_id ORDER BY COUNT(cited_paper_id) ASC LIMIT 1 ), ( SELECT COUNT(cited_paper_id) FROM cites GROUP BY cited_paper_id ORDER BY COUNT(cited_paper_id) ASC LIMIT 1 ) FROM cites GROUP BY cited_paper_id ORDER BY COUNT(cited_pa...
[ { "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 cites\n(\n cited_paper_id TEXT not null,\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 cites ( cited_paper_id TEXT not null, citing_paper_id TEXT not null, primary key (cited_paper_id, citing_paper_id) ) CREATE TABLE paper ( paper_id TEXT not null primary key, class_label TEXT not null ) CREATE TABLE content ( paper_id TEXT not n...
SELECT CAST(COUNT(CASE WHEN class_label = 'ML' THEN paper_id ELSE NULL END) AS REAL) / COUNT(paper_id) FROM paper
[ { "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 cites\n(\n cited_paper_id TEXT not null,\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 cites ( cited_paper_id TEXT not null, citing_paper_id TEXT not null, primary key (cited_paper_id, citing_paper_id) ) CREATE TABLE paper ( paper_id TEXT not null primary key, class_label TEXT not null ) CREATE TABLE content ( paper_id TEXT not n...
SELECT DISTINCT T2.word_cited_id FROM cites AS T1 INNER JOIN content AS T2 ON T1.cited_paper_id = T2.paper_id WHERE T1.citing_paper_id = 'sima01computational'
[ { "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 cites\n(\n cited_paper_id TEXT not null,\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 cites ( cited_paper_id TEXT not null, citing_paper_id TEXT not null, primary key (cited_paper_id, citing_paper_id) ) CREATE TABLE paper ( paper_id TEXT not null primary key, class_label TEXT not null ) CREATE TABLE content ( paper_id TEXT not n...
SELECT COUNT(T2.paper_id) FROM cites AS T1 INNER JOIN content AS T2 ON T1.cited_paper_id = T2.paper_id WHERE T1.citing_paper_id = 'schmidt99advanced' AND T2.word_cited_id = 'word3555'
[ { "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 cites\n(\n cited_paper_id TEXT not null,\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 cites ( cited_paper_id TEXT not null, citing_paper_id TEXT not null, primary key (cited_paper_id, citing_paper_id) ) CREATE TABLE paper ( paper_id TEXT not null primary key, class_label TEXT not null ) CREATE TABLE content ( paper_id TEXT not n...
SELECT DISTINCT T1.class_label FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id WHERE T2.word_cited_id = 'word1163'
[ { "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 cites\n(\n cited_paper_id TEXT not null,\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 cites ( cited_paper_id TEXT not null, citing_paper_id TEXT not null, primary key (cited_paper_id, citing_paper_id) ) CREATE TABLE paper ( paper_id TEXT not null primary key, class_label TEXT not null ) CREATE TABLE content ( paper_id TEXT not n...
SELECT T1.paper_id FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id WHERE T1.class_label = 'DB' GROUP BY T1.paper_id ORDER BY COUNT(T2.word_cited_id) 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 cites\n(\n cited_paper_id TEXT not null,\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 cites ( cited_paper_id TEXT not null, citing_paper_id TEXT not null, primary key (cited_paper_id, citing_paper_id) ) CREATE TABLE paper ( paper_id TEXT not null primary key, class_label TEXT not null ) CREATE TABLE content ( paper_id TEXT not n...
SELECT COUNT(T1.paper_id) FROM paper AS T1 INNER JOIN cites AS T2 ON T1.paper_id = T2.citing_paper_id WHERE T1.class_label = 'ML' AND T2.cited_paper_id = 'butz01algorithmic'
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT name FROM Person WHERE birthdate IS NOT NULL ORDER BY birthdate 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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT nickname FROM Person WHERE name = 'Dan Castellaneta';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT COUNT(name) FROM Person WHERE birth_region = 'New York' AND SUBSTR(birthdate, 1, 4) > '1970';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT T1.birth_country FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.award = 'Outstanding Voice-Over Performance' AND T2.year = 2009 AND T2.result = 'Winner';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT T2.award FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T1.nickname = 'Doofus' AND T2.result = 'Winner';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT COUNT(*) FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T1.birth_country = 'USA' AND T2.result = 'Nominee' AND T2.award = 'Outstanding Animated Program (For Programming Less Than One Hour)' AND T2.year = 2009;
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT DISTINCT T1.character FROM Character_Award AS T1 INNER JOIN Award AS T2 ON T1.award_id = T2.award_id WHERE T2.award = 'Outstanding Voice-Over Performance' AND T2.year = 2009 AND T2.result = 'Winner';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Lost Verizon';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT COUNT(T2.keyword) FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.air_date = '2008-10-19';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT T2.rating FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.award = 'Outstanding Voice-Over Performance' AND SUBSTR(T1.year, 1, 4) = '2009' AND T1.person = 'Dan Castellaneta';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT COUNT(*) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.title = 'Lost Verizon' AND T2.stars = 7;
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT T2.stars FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.title = 'Lost Verizon' ORDER BY T2.votes 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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT T1.title FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T2.votes > 200 AND T2.stars = 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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT COUNT(*) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE SUBSTR(T1.air_date, 1, 4) = '2009' AND T2.stars = 10 AND T2.percent > 15;
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT T1.title FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T2.stars = 7 ORDER BY T2.votes 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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT CAST(SUM(T2.votes * T2.stars) AS REAL) / SUM(T2.votes) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.title = 'Lost Verizon';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT CAST(SUM(CASE WHEN T1.award_category = 'Primetime Emmy' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T2.rating > 7 AND T1.result = 'Nominee';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT T1.title FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.person = 'Pamela Hayden' AND T2.role = 'Ruthie';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT T2.role, T1.episode, T1.number_in_series FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.person = 'Matt Groening' AND T1.title = 'In the Name of the Grandfather';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT T1.title, T1.summary FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T2.keyword = 'eviction';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT AVG(T2.stars) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.title = 'Wedding for Disaster';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT T1.title, T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.air_date = '2009-03-22';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT DISTINCT T1.birth_name FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T2.role = 'Helen Lovejoy';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT CAST(SUM(CASE WHEN T2.credited = 'false' THEN 1 END) AS REAL) * 100 / SUM(CASE WHEN T2.credited = 'true' THEN 1 END), T3.title, T2.person FROM Award AS T1 INNER JOIN Credit AS T2 ON T2.episode_id = T1.episode_id INNER JOIN Episode AS T3 ON T1.episode_id = T3.episode_id WHERE SUBSTR(T1.year, 1, 4) = '2017' AND T1...
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT COUNT(episode_id) FROM Episode WHERE votes > 1000;
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT COUNT(name) FROM Person WHERE birth_place = 'New York City' AND birth_country = 'USA';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT award_id, award_category FROM Award WHERE person = 'Marc Wilmore';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT COUNT(name) FROM Person WHERE nickname IS NOT NULL;
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT AVG(height_meters) FROM Person;
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT MAX(votes) - MIN(votes) FROM Vote;
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT T2.character FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T1.year = 2009 AND T1.award = 'Outstanding Voice-Over Performance';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT COUNT(*) FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.year = 2009 AND T2.award = 'Comedy Series' AND T1.birth_region = 'California';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT T2.title FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE SUBSTR(T1.year, 1, 4) = '2017' AND T1.award = 'Best International TV Series' AND T1.result = 'Winner';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT T2.person FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'How the Test Was Won' AND T2.credited = 'false';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT DISTINCT T1.title FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T2.keyword IN ('riot', 'cake');
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT T1.title FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T2.stars = 10 ORDER BY T1.votes 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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT DISTINCT T2.person FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE SUBSTR(T1.air_date, 6, 2) BETWEEN '10' AND '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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT T2.person FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Treehouse of Horror XIX' AND T2.role = 'director';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT COUNT(DISTINCT T2.role) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.episode = 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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Take My Life, Please';
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT CAST(SUM(CASE WHEN T1.award = 'Outstanding Voice-Over Performance' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.episode_id) FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T2.votes > 950 AND T1.year = 2009;
[ { "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 \"Episode\"\n(\n episode_id TEXT\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 "Episode" ( episode_id TEXT constraint Episode_pk primary key, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TE...
SELECT CAST(SUM(CASE WHEN T1.title = 'No Loan Again, Naturally' THEN T1.votes ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.title = 'Coming to Homerica' THEN T1.votes ELSE 0 END) AS ratio FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T2.stars = 5;