messages
listlengths
3
3
system
stringclasses
1 value
user
stringlengths
326
8.38k
assistant
stringlengths
18
577
[ { "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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You 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 `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_address_id` INTEGER NOT NULL,...
SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn" AND nickname LIKE "%s%";
[ { "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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You 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 `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_address_id` INTEGER NOT NULL,...
SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn" AND nickname LIKE "%s%";
[ { "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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You 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 `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_address_id` INTEGER NOT NULL,...
SELECT count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE "%a%"
[ { "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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You 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 `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_address_id` INTEGER NOT NULL,...
SELECT count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE "%a%"
[ { "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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You 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 `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_address_id` INTEGER NOT NULL,...
SELECT sum(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";
[ { "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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You 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 `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_address_id` INTEGER NOT NULL,...
SELECT sum(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";
[ { "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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You 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 `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_address_id` INTEGER NOT NULL,...
SELECT avg(price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";
[ { "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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You 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 `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_address_id` INTEGER NOT NULL,...
SELECT avg(price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";
[ { "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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You 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 `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_address_id` INTEGER NOT NULL,...
SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Ray"
[ { "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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You 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 `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_address_id` INTEGER NOT NULL,...
SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Ray"
[ { "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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You 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 `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_address_id` INTEGER NOT NULL,...
SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff
[ { "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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You 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 `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_address_id` INTEGER NOT NULL,...
SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff
[ { "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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You 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 `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_address_id` INTEGER NOT NULL,...
SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You 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 `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_address_id` INTEGER NOT NULL,...
SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You 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 `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_address_id` INTEGER NOT NULL,...
SELECT T1.vehicle_id , T1.vehicle_details FROM Vehicles AS T1 JOIN Lessons AS T2 ON T1.vehicle_id = T2.vehicle_id GROUP BY T1.vehicle_id ORDER BY count(*) 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT count(*) FROM Faculty
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT count(*) FROM Faculty
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT DISTINCT rank FROM Faculty
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT DISTINCT rank FROM Faculty
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT DISTINCT building FROM Faculty
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT DISTINCT building FROM Faculty
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT rank , Fname , Lname FROM Faculty
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT rank , Fname , Lname FROM Faculty
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT Fname , Lname , phone FROM Faculty WHERE Sex = 'F'
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT Fname , Lname , phone FROM Faculty WHERE Sex = 'F'
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT FacID FROM Faculty WHERE Sex = 'M'
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT FacID FROM Faculty WHERE Sex = 'M'
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT count(*) FROM Faculty WHERE Sex = 'F' AND Rank = "Professor"
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT count(*) FROM Faculty WHERE Sex = 'F' AND Rank = "Professor"
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT phone , room , building FROM Faculty WHERE Fname = "Jerry" AND Lname = "Prince"
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT phone , room , building FROM Faculty WHERE Fname = "Jerry" AND Lname = "Prince"
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT count(*) FROM Faculty WHERE Rank = "Professor" AND building = "NEB"
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT count(*) FROM Faculty WHERE Rank = "Professor" AND building = "NEB"
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT fname , lname FROM Faculty WHERE Rank = "Instructor"
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT fname , lname FROM Faculty WHERE Rank = "Instructor"
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT building , count(*) FROM Faculty GROUP BY building
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT building , count(*) FROM Faculty GROUP BY building
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT building FROM Faculty GROUP BY building ORDER BY count(*) 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT building FROM Faculty GROUP BY building ORDER BY count(*) 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT building FROM Faculty WHERE rank = "Professor" GROUP BY building HAVING count(*) >= 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT building FROM Faculty WHERE rank = "Professor" GROUP BY building HAVING count(*) >= 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT rank , count(*) FROM Faculty GROUP BY rank
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT rank , count(*) FROM Faculty GROUP BY rank
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT rank , sex , count(*) FROM Faculty GROUP BY rank , sex
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT rank , sex , count(*) FROM Faculty GROUP BY rank , sex
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT rank FROM Faculty GROUP BY rank ORDER BY count(*) 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT rank FROM Faculty GROUP BY rank ORDER BY count(*) 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT sex , count(*) FROM Faculty WHERE rank = "AsstProf" GROUP BY sex
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT sex , count(*) FROM Faculty WHERE rank = "AsstProf" GROUP BY sex
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T2.fname = "Linda" AND T2.lname = "Smith"
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T2.fname = "Linda" AND T2.lname = "Smith"
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = "Professor"
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = "Professor"
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T2.fname , T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.fname = "Michael" AND T1.lname = "Goodrich"
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T2.fname , T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.fname = "Michael" AND T1.lname = "Goodrich"
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.FacID , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.FacID , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.rank , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.rank , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID ORDER BY count(*) 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID ORDER BY count(*) 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING count(*) >= 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING count(*) >= 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT activity_name FROM Activity
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT activity_name FROM Activity
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT count(*) FROM Activity
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT count(*) FROM Activity
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT count(DISTINCT FacID) FROM Faculty_participates_in
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT count(DISTINCT FacID) FROM Faculty_participates_in
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID WHERE T1.fname = "Mark" AND T1.lname = "Giuliano"
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID WHERE T1.fname = "Mark" AND T1.lname = "Giuliano"
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN Activity AS T3 ON T3.actid = T2.actid WHERE T1.fname = "Mark" AND T1.lname = "Giuliano"
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN Activity AS T3 ON T3.actid = T2.actid WHERE T1.fname = "Mark" AND T1.lname = "Giuliano"
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.fname , T1.lname , count(*) , T1.FacID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.fname , T1.lname , count(*) , T1.FacID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.activity_name , count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.activity_name , count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID ORDER BY count(*) 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID ORDER BY count(*) 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.fname , T1.lname FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.fname , T1.lname FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) 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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT lname FROM faculty WHERE rank = 'Professor' EXCEPT SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT lname FROM faculty WHERE rank = 'Professor' EXCEPT SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'
[ { "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 Activity (\n actid INTEGER PRIMARY KEY,\n acti...
You 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 Activity ( actid INTEGER PRIMARY KEY, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER, FOREIGN KEY(stuid) REFERENCES Student(StuID), FOREIGN KEY(actid) REFERENCES Activity(actid) ) CREATE TABLE Faculty_Participates_in ( FacID INTEG...
SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T...