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 `Staff` (\n`staff_id` INTEGER PRIMARY KEY,\n`gen...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `gender` VARCHAR(1), `first_name` VARCHAR(80), `last_name` VARCHAR(80), `email_address` VARCHAR(255), `phone_number` VARCHAR(80) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_type_code` VARCHAR(20) NOT NULL, `address...
SELECT count(*) FROM customers GROUP BY customer_type_code 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 `Staff` (\n`staff_id` INTEGER PRIMARY KEY,\n`gen...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `gender` VARCHAR(1), `first_name` VARCHAR(80), `last_name` VARCHAR(80), `email_address` VARCHAR(255), `phone_number` VARCHAR(80) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_type_code` VARCHAR(20) NOT NULL, `address...
SELECT count(*) FROM customers GROUP BY customer_type_code 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 `Staff` (\n`staff_id` INTEGER PRIMARY KEY,\n`gen...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `gender` VARCHAR(1), `first_name` VARCHAR(80), `last_name` VARCHAR(80), `email_address` VARCHAR(255), `phone_number` VARCHAR(80) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_type_code` VARCHAR(20) NOT NULL, `address...
SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised 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 `Staff` (\n`staff_id` INTEGER PRIMARY KEY,\n`gen...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `gender` VARCHAR(1), `first_name` VARCHAR(80), `last_name` VARCHAR(80), `email_address` VARCHAR(255), `phone_number` VARCHAR(80) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_type_code` VARCHAR(20) NOT NULL, `address...
SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised 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 `Staff` (\n`staff_id` INTEGER PRIMARY KEY,\n`gen...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `gender` VARCHAR(1), `first_name` VARCHAR(80), `last_name` VARCHAR(80), `email_address` VARCHAR(255), `phone_number` VARCHAR(80) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_type_code` VARCHAR(20) NOT NULL, `address...
SELECT count(DISTINCT complaint_type_code) FROM complaints
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Staff` (\n`staff_id` INTEGER PRIMARY KEY,\n`gen...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `gender` VARCHAR(1), `first_name` VARCHAR(80), `last_name` VARCHAR(80), `email_address` VARCHAR(255), `phone_number` VARCHAR(80) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_type_code` VARCHAR(20) NOT NULL, `address...
SELECT count(DISTINCT complaint_type_code) FROM complaints
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Staff` (\n`staff_id` INTEGER PRIMARY KEY,\n`gen...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `gender` VARCHAR(1), `first_name` VARCHAR(80), `last_name` VARCHAR(80), `email_address` VARCHAR(255), `phone_number` VARCHAR(80) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_type_code` VARCHAR(20) NOT NULL, `address...
SELECT address_line_1 , address_line_2 FROM customers WHERE email_address = "vbogisich@example.org"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Staff` (\n`staff_id` INTEGER PRIMARY KEY,\n`gen...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `gender` VARCHAR(1), `first_name` VARCHAR(80), `last_name` VARCHAR(80), `email_address` VARCHAR(255), `phone_number` VARCHAR(80) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_type_code` VARCHAR(20) NOT NULL, `address...
SELECT address_line_1 , address_line_2 FROM customers WHERE email_address = "vbogisich@example.org"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Staff` (\n`staff_id` INTEGER PRIMARY KEY,\n`gen...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `gender` VARCHAR(1), `first_name` VARCHAR(80), `last_name` VARCHAR(80), `email_address` VARCHAR(255), `phone_number` VARCHAR(80) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_type_code` VARCHAR(20) NOT NULL, `address...
SELECT complaint_status_code , count(*) FROM complaints WHERE complaint_type_code = "Product Failure" GROUP BY complaint_status_code
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Staff` (\n`staff_id` INTEGER PRIMARY KEY,\n`gen...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `gender` VARCHAR(1), `first_name` VARCHAR(80), `last_name` VARCHAR(80), `email_address` VARCHAR(255), `phone_number` VARCHAR(80) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_type_code` VARCHAR(20) NOT NULL, `address...
SELECT complaint_status_code , count(*) FROM complaints WHERE complaint_type_code = "Product Failure" GROUP BY complaint_status_code
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Staff` (\n`staff_id` INTEGER PRIMARY KEY,\n`gen...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `gender` VARCHAR(1), `first_name` VARCHAR(80), `last_name` VARCHAR(80), `email_address` VARCHAR(255), `phone_number` VARCHAR(80) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_type_code` VARCHAR(20) NOT NULL, `address...
SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY count(*) LIMIT 5
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Staff` (\n`staff_id` INTEGER PRIMARY KEY,\n`gen...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `gender` VARCHAR(1), `first_name` VARCHAR(80), `last_name` VARCHAR(80), `email_address` VARCHAR(255), `phone_number` VARCHAR(80) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_type_code` VARCHAR(20) NOT NULL, `address...
SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY count(*) LIMIT 5
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Staff` (\n`staff_id` INTEGER PRIMARY KEY,\n`gen...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `gender` VARCHAR(1), `first_name` VARCHAR(80), `last_name` VARCHAR(80), `email_address` VARCHAR(255), `phone_number` VARCHAR(80) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_type_code` VARCHAR(20) NOT NULL, `address...
SELECT state FROM customers GROUP BY state ORDER BY count(*) 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 `Staff` (\n`staff_id` INTEGER PRIMARY KEY,\n`gen...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `gender` VARCHAR(1), `first_name` VARCHAR(80), `last_name` VARCHAR(80), `email_address` VARCHAR(255), `phone_number` VARCHAR(80) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_type_code` VARCHAR(20) NOT NULL, `address...
SELECT state FROM customers GROUP BY state ORDER BY count(*) 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 \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT count(*) FROM submission
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT count(*) FROM submission
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT Author FROM submission ORDER BY Scores ASC
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT Author FROM submission ORDER BY Scores ASC
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT Author , College FROM submission
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT Author , College FROM submission
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT Author FROM submission WHERE College = "Florida" OR College = "Temple"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT Author FROM submission WHERE College = "Florida" OR College = "Temple"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT avg(Scores) FROM submission
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT avg(Scores) FROM submission
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT Author FROM submission ORDER BY Scores 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 \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT Author FROM submission ORDER BY Scores 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 \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT College , COUNT(*) FROM submission GROUP BY College
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT College , COUNT(*) FROM submission GROUP BY College
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT College FROM submission GROUP BY College 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 \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT College FROM submission GROUP BY College 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 \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT T2.Author , T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_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 \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT T2.Author , T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_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 \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores 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 \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores 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 \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT T2.Author , COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT T2.Author , COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_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 \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_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 \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT Date , Venue FROM workshop ORDER BY Venue
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT Date , Venue FROM workshop ORDER BY Venue
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT Author FROM submission WHERE Submission_ID NOT IN (SELECT Submission_ID FROM acceptance)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"workshop\" (\n\"Workshop_ID\" int,\n\"Date\" t...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "workshop" ( "Workshop_ID" int, "Date" text, "Venue" text, "Name" text, PRIMARY KEY ("Workshop_ID") ) CREATE TABLE "submission" ( "Submission_ID" int, "Scores" real, "Author" text, "College" text, PRIMARY KEY ("Submission_ID") ) CREATE TABLE "Acceptance" ( "Submission_ID" int, "Worksh...
SELECT Author FROM submission WHERE Submission_ID NOT IN (SELECT Submission_ID FROM acceptance)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT count(*) FROM INVESTORS
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT Investor_details FROM INVESTORS
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT DISTINCT lot_details FROM LOTS
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT max(amount_of_transaction) FROM TRANSACTIONS
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT date_of_transaction , share_count FROM TRANSACTIONS
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT sum(share_count) FROM TRANSACTIONS
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT transaction_id FROM TRANSACTIONS WHERE transaction_type_code = 'PUR'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT date_of_transaction FROM TRANSACTIONS WHERE transaction_type_code = "SALE"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT avg(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = "SALE"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT transaction_type_description FROM Ref_Transaction_Types WHERE transaction_type_code = "PUR"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT min(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = "PUR" AND share_count > 50
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT max(share_count) FROM TRANSACTIONS WHERE amount_of_transaction < 10000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count > 100 OR amount_of_transaction > 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 `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT T1.transaction_type_description , T2.date_of_transaction FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code WHERE T2.share_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 `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.share_count > 100
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT COUNT(DISTINCT transaction_type_code) FROM TRANSACTIONS
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT lot_details , investor_id FROM LOTS
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT T2.lot_details FROM INVESTORS AS T1 JOIN LOTS AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = "l"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT T1.purchase_details FROM PURCHASES AS T1 JOIN TRANSACTIONS AS T2 ON T1.purchase_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction > 10000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT T1.sales_details , T2.date_of_transaction FROM SALES AS T1 JOIN TRANSACTIONS AS T2 ON T1.sales_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction < 3000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count < 50
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count > 100 AND T3.transaction_type_code = "PUR"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT transaction_type_code , avg(amount_of_transaction) FROM TRANSACTIONS GROUP BY transaction_type_code
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT transaction_type_code , max(share_count) , min(share_count) FROM TRANSACTIONS GROUP BY transaction_type_code
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT investor_id , avg(share_count) FROM TRANSACTIONS GROUP BY investor_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 `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT investor_id , avg(share_count) FROM TRANSACTIONS GROUP BY investor_id ORDER BY avg(share_count)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT investor_id , avg(amount_of_transaction) FROM TRANSACTIONS GROUP BY investor_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 `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT T2.lot_id , avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_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 `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT T2.lot_id , avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id ORDER BY avg(amount_of_transaction)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT investor_id , COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code = "SALE" GROUP BY investor_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 `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT investor_id , COUNT(*) FROM TRANSACTIONS GROUP BY investor_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 `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code 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 `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code 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 `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT T1.transaction_type_description FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code GROUP BY T1.transaction_type_code 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 `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT T2.investor_id , T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_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 `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT T2.investor_id , T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) 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 `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT T2.investor_id FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id 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 `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT T2.investor_id , T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = "SALE" GROUP BY T2.investor_id 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 `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count >= 100 OR amount_of_transaction >= 100
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT sales_details FROM sales UNION SELECT purchase_details FROM purchases
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Investors` (\n`investor_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 `Investors` ( `investor_id` INTEGER PRIMARY KEY, `Investor_details` VARCHAR(255) ) CREATE TABLE `Lots` ( `lot_id` INTEGER PRIMARY KEY, `investor_id` INTEGER NOT NULL, `lot_details` VARCHAR(255), FOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ) ) CREATE TABLE `Ref_Tr...
SELECT lot_details FROM Lots EXCEPT SELECT T1.lot_details FROM Lots AS T1 JOIN transactions_lots AS T2 ON T1.lot_id = T2.lot_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 Ref_Hotel_Star_Ratings (\nstar_rating_code CHAR(...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Ref_Hotel_Star_Ratings ( star_rating_code CHAR(15) NOT NULL, star_rating_description VARCHAR(80), PRIMARY KEY (star_rating_code), UNIQUE (star_rating_code) ) CREATE TABLE Locations ( Location_ID INTEGER NOT NULL, Location_Name VARCHAR(255), Address VARCHAR(255), Other_Details VARCHAR(2...
SELECT count(*) FROM HOTELS
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Ref_Hotel_Star_Ratings (\nstar_rating_code CHAR(...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Ref_Hotel_Star_Ratings ( star_rating_code CHAR(15) NOT NULL, star_rating_description VARCHAR(80), PRIMARY KEY (star_rating_code), UNIQUE (star_rating_code) ) CREATE TABLE Locations ( Location_ID INTEGER NOT NULL, Location_Name VARCHAR(255), Address VARCHAR(255), Other_Details VARCHAR(2...
SELECT count(*) FROM HOTELS
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Ref_Hotel_Star_Ratings (\nstar_rating_code CHAR(...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Ref_Hotel_Star_Ratings ( star_rating_code CHAR(15) NOT NULL, star_rating_description VARCHAR(80), PRIMARY KEY (star_rating_code), UNIQUE (star_rating_code) ) CREATE TABLE Locations ( Location_ID INTEGER NOT NULL, Location_Name VARCHAR(255), Address VARCHAR(255), Other_Details VARCHAR(2...
SELECT price_range FROM HOTELS
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Ref_Hotel_Star_Ratings (\nstar_rating_code CHAR(...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Ref_Hotel_Star_Ratings ( star_rating_code CHAR(15) NOT NULL, star_rating_description VARCHAR(80), PRIMARY KEY (star_rating_code), UNIQUE (star_rating_code) ) CREATE TABLE Locations ( Location_ID INTEGER NOT NULL, Location_Name VARCHAR(255), Address VARCHAR(255), Other_Details VARCHAR(2...
SELECT price_range FROM HOTELS
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Ref_Hotel_Star_Ratings (\nstar_rating_code CHAR(...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Ref_Hotel_Star_Ratings ( star_rating_code CHAR(15) NOT NULL, star_rating_description VARCHAR(80), PRIMARY KEY (star_rating_code), UNIQUE (star_rating_code) ) CREATE TABLE Locations ( Location_ID INTEGER NOT NULL, Location_Name VARCHAR(255), Address VARCHAR(255), Other_Details VARCHAR(2...
SELECT DISTINCT Location_Name FROM LOCATIONS
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Ref_Hotel_Star_Ratings (\nstar_rating_code CHAR(...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Ref_Hotel_Star_Ratings ( star_rating_code CHAR(15) NOT NULL, star_rating_description VARCHAR(80), PRIMARY KEY (star_rating_code), UNIQUE (star_rating_code) ) CREATE TABLE Locations ( Location_ID INTEGER NOT NULL, Location_Name VARCHAR(255), Address VARCHAR(255), Other_Details VARCHAR(2...
SELECT DISTINCT Location_Name FROM LOCATIONS
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Ref_Hotel_Star_Ratings (\nstar_rating_code CHAR(...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Ref_Hotel_Star_Ratings ( star_rating_code CHAR(15) NOT NULL, star_rating_description VARCHAR(80), PRIMARY KEY (star_rating_code), UNIQUE (star_rating_code) ) CREATE TABLE Locations ( Location_ID INTEGER NOT NULL, Location_Name VARCHAR(255), Address VARCHAR(255), Other_Details VARCHAR(2...
SELECT Name , Other_Details 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 Ref_Hotel_Star_Ratings (\nstar_rating_code CHAR(...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Ref_Hotel_Star_Ratings ( star_rating_code CHAR(15) NOT NULL, star_rating_description VARCHAR(80), PRIMARY KEY (star_rating_code), UNIQUE (star_rating_code) ) CREATE TABLE Locations ( Location_ID INTEGER NOT NULL, Location_Name VARCHAR(255), Address VARCHAR(255), Other_Details VARCHAR(2...
SELECT Name , Other_Details 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 Ref_Hotel_Star_Ratings (\nstar_rating_code CHAR(...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Ref_Hotel_Star_Ratings ( star_rating_code CHAR(15) NOT NULL, star_rating_description VARCHAR(80), PRIMARY KEY (star_rating_code), UNIQUE (star_rating_code) ) CREATE TABLE Locations ( Location_ID INTEGER NOT NULL, Location_Name VARCHAR(255), Address VARCHAR(255), Other_Details VARCHAR(2...
SELECT Tourist_Details FROM VISITORS
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Ref_Hotel_Star_Ratings (\nstar_rating_code CHAR(...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Ref_Hotel_Star_Ratings ( star_rating_code CHAR(15) NOT NULL, star_rating_description VARCHAR(80), PRIMARY KEY (star_rating_code), UNIQUE (star_rating_code) ) CREATE TABLE Locations ( Location_ID INTEGER NOT NULL, Location_Name VARCHAR(255), Address VARCHAR(255), Other_Details VARCHAR(2...
SELECT Tourist_Details FROM VISITORS
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Ref_Hotel_Star_Ratings (\nstar_rating_code CHAR(...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Ref_Hotel_Star_Ratings ( star_rating_code CHAR(15) NOT NULL, star_rating_description VARCHAR(80), PRIMARY KEY (star_rating_code), UNIQUE (star_rating_code) ) CREATE TABLE Locations ( Location_ID INTEGER NOT NULL, Location_Name VARCHAR(255), Address VARCHAR(255), Other_Details VARCHAR(2...
SELECT price_range FROM HOTELS WHERE star_rating_code = "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 Ref_Hotel_Star_Ratings (\nstar_rating_code CHAR(...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Ref_Hotel_Star_Ratings ( star_rating_code CHAR(15) NOT NULL, star_rating_description VARCHAR(80), PRIMARY KEY (star_rating_code), UNIQUE (star_rating_code) ) CREATE TABLE Locations ( Location_ID INTEGER NOT NULL, Location_Name VARCHAR(255), Address VARCHAR(255), Other_Details VARCHAR(2...
SELECT price_range FROM HOTELS WHERE star_rating_code = "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 Ref_Hotel_Star_Ratings (\nstar_rating_code CHAR(...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Ref_Hotel_Star_Ratings ( star_rating_code CHAR(15) NOT NULL, star_rating_description VARCHAR(80), PRIMARY KEY (star_rating_code), UNIQUE (star_rating_code) ) CREATE TABLE Locations ( Location_ID INTEGER NOT NULL, Location_Name VARCHAR(255), Address VARCHAR(255), Other_Details VARCHAR(2...
SELECT avg(price_range) FROM HOTELS WHERE star_rating_code = "5" AND pets_allowed_yn = 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 Ref_Hotel_Star_Ratings (\nstar_rating_code CHAR(...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Ref_Hotel_Star_Ratings ( star_rating_code CHAR(15) NOT NULL, star_rating_description VARCHAR(80), PRIMARY KEY (star_rating_code), UNIQUE (star_rating_code) ) CREATE TABLE Locations ( Location_ID INTEGER NOT NULL, Location_Name VARCHAR(255), Address VARCHAR(255), Other_Details VARCHAR(2...
SELECT avg(price_range) FROM HOTELS WHERE star_rating_code = "5" AND pets_allowed_yn = 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 Ref_Hotel_Star_Ratings (\nstar_rating_code CHAR(...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Ref_Hotel_Star_Ratings ( star_rating_code CHAR(15) NOT NULL, star_rating_description VARCHAR(80), PRIMARY KEY (star_rating_code), UNIQUE (star_rating_code) ) CREATE TABLE Locations ( Location_ID INTEGER NOT NULL, Location_Name VARCHAR(255), Address VARCHAR(255), Other_Details VARCHAR(2...
SELECT Address FROM LOCATIONS WHERE Location_Name = "UK Gallery"