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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT card_id , customer_id , card_type_code , card_number FROM Customers_cards
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT date_valid_from , date_valid_to FROM Customers_cards WHERE card_number = "4560596484842"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT date_valid_from , date_valid_to FROM Customers_cards WHERE card_number = "4560596484842"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_number = "4560596484842"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_number = "4560596484842"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Art" AND T2.customer_last_name = "Turcotte"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Art" AND T2.customer_last_name = "Turcotte"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT count(*) FROM Customers_cards WHERE card_type_code = "Debit"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT count(*) FROM Customers_cards WHERE card_type_code = "Debit"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Blanche" AND T2.customer_last_name = "Huels" AND T1.card_type_code = "Credit"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Blanche" AND T2.customer_last_name = "Huels" AND T1.card_type_code = "Credit"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT customer_id , count(*) FROM Customers_cards GROUP BY customer_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT customer_id , count(*) FROM Customers_cards GROUP BY customer_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT customer_id , count(*) FROM Customers_cards GROUP BY customer_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT customer_id , count(*) FROM Customers_cards GROUP BY customer_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id 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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id 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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT card_type_code , count(*) FROM Customers_cards GROUP BY card_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT card_type_code , count(*) FROM Customers_cards GROUP BY card_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT card_type_code FROM Customers_cards GROUP BY card_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT card_type_code FROM Customers_cards GROUP BY card_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT card_type_code FROM Customers_cards GROUP BY card_type_code HAVING count(*) >= 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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT card_type_code FROM Customers_cards GROUP BY card_type_code HAVING count(*) >= 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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT card_type_code , count(DISTINCT customer_id) FROM Customers_cards GROUP BY card_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT card_type_code , count(DISTINCT customer_id) FROM Customers_cards GROUP BY card_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT customer_id , customer_first_name FROM Customers EXCEPT SELECT T1.customer_id , T2.customer_first_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE card_type_code = "Credit"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT customer_id , customer_first_name FROM Customers EXCEPT SELECT T1.customer_id , T2.customer_first_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE card_type_code = "Credit"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT DISTINCT card_type_code FROM Customers_Cards
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT DISTINCT card_type_code FROM Customers_Cards
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT count(DISTINCT card_type_code) FROM Customers_Cards
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT count(DISTINCT card_type_code) FROM Customers_Cards
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT DISTINCT transaction_type FROM Financial_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT DISTINCT transaction_type FROM Financial_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT count(DISTINCT transaction_type) FROM Financial_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT count(DISTINCT transaction_type) FROM Financial_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT avg(transaction_amount) , sum(transaction_amount) FROM Financial_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT avg(transaction_amount) , sum(transaction_amount) FROM Financial_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT T2.card_type_code , count(*) FROM Financial_transactions AS T1 JOIN Customers_cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT T2.card_type_code , count(*) FROM Financial_transactions AS T1 JOIN Customers_cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT transaction_type , count(*) FROM Financial_transactions GROUP BY transaction_type
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT transaction_type , count(*) FROM Financial_transactions GROUP BY transaction_type
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY sum(transaction_amount) 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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY sum(transaction_amount) 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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT account_id , count(*) FROM Financial_transactions GROUP BY account_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 `Accounts` (\n`account_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 `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT account_id , count(*) FROM Financial_transactions GROUP BY account_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 \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT count(*) FROM track
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT count(*) FROM track
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT name , LOCATION FROM track
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT name , LOCATION FROM track
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT name , seating FROM track WHERE year_opened > 2000 ORDER BY seating
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT name , seating FROM track WHERE year_opened > 2000 ORDER BY seating
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT name , LOCATION , seating FROM track ORDER BY year_opened 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 \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT name , LOCATION , seating FROM track ORDER BY year_opened 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 \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT min(seating) , max(seating) , avg(seating) FROM track
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT min(seating) , max(seating) , avg(seating) FROM track
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT name , LOCATION , year_opened FROM track WHERE seating > (SELECT avg(seating) FROM track)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT name , LOCATION , year_opened FROM track WHERE seating > (SELECT avg(seating) FROM track)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT DISTINCT LOCATION FROM track
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT DISTINCT LOCATION FROM track
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT count(*) FROM race
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT count(*) FROM race
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT DISTINCT CLASS FROM race
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT DISTINCT CLASS FROM race
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT name , CLASS , date FROM race
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT name , CLASS , date FROM race
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT CLASS , count(*) FROM race GROUP BY CLASS
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT CLASS , count(*) FROM race GROUP BY CLASS
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT CLASS FROM race GROUP BY CLASS 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 \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT CLASS FROM race GROUP BY CLASS 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 \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT CLASS FROM race GROUP BY CLASS 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 \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT CLASS FROM race GROUP BY CLASS 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 \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT name FROM track EXCEPT SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id WHERE T1.class = 'GT'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT name FROM track EXCEPT SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id WHERE T1.class = 'GT'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT name FROM track WHERE track_id NOT IN (SELECT track_id FROM race)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT name FROM track WHERE track_id NOT IN (SELECT track_id FROM race)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT T2.name , count(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_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 \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT T2.name , count(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_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 \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_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 \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_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 \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT T1.name , T1.date , T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_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 \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT T1.name , T1.date , T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_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 \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT T2.name , T2.location FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id HAVING count(*) = 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 \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT T2.name , T2.location FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id HAVING count(*) = 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 \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n\"Race_ID\" int,\n\"Name\" text,\n\"...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "race" ( "Race_ID" int, "Name" text, "Class" text, "Date" text, "Track_ID" text, PRIMARY KEY ("Race_ID"), FOREIGN KEY ("Track_ID") REFERENCES "track"("Track_ID") ) CREATE TABLE "track" ( "Track_ID" int, "Name" text, "Location" text, "Seating" real, "Year_Opened" real, PRIMARY KEY ("Tra...
SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"shop\" (\n\"Shop_ID\" int,\n\"Address\" text,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "shop" ( "Shop_ID" int, "Address" text, "Num_of_staff" text, "Score" real, "Open_Year" text, PRIMARY KEY ("Shop_ID") ) CREATE TABLE "member" ( "Member_ID" int, "Name" text, "Membership_card" text, "Age" int, "Time_of_purchase" int, "Level_of_membership" int, "Address" text, PRIMARY KEY...
SELECT count(*) FROM member WHERE Membership_card = 'Black'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"shop\" (\n\"Shop_ID\" int,\n\"Address\" text,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "shop" ( "Shop_ID" int, "Address" text, "Num_of_staff" text, "Score" real, "Open_Year" text, PRIMARY KEY ("Shop_ID") ) CREATE TABLE "member" ( "Member_ID" int, "Name" text, "Membership_card" text, "Age" int, "Time_of_purchase" int, "Level_of_membership" int, "Address" text, PRIMARY KEY...
SELECT count(*) , address FROM member GROUP BY address
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"shop\" (\n\"Shop_ID\" int,\n\"Address\" text,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "shop" ( "Shop_ID" int, "Address" text, "Num_of_staff" text, "Score" real, "Open_Year" text, PRIMARY KEY ("Shop_ID") ) CREATE TABLE "member" ( "Member_ID" int, "Name" text, "Membership_card" text, "Age" int, "Time_of_purchase" int, "Level_of_membership" int, "Address" text, PRIMARY KEY...
SELECT name FROM member WHERE address = 'Harford' OR address = 'Waterbury'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"shop\" (\n\"Shop_ID\" int,\n\"Address\" text,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "shop" ( "Shop_ID" int, "Address" text, "Num_of_staff" text, "Score" real, "Open_Year" text, PRIMARY KEY ("Shop_ID") ) CREATE TABLE "member" ( "Member_ID" int, "Name" text, "Membership_card" text, "Age" int, "Time_of_purchase" int, "Level_of_membership" int, "Address" text, PRIMARY KEY...
SELECT name , member_id FROM member WHERE Membership_card = 'Black' OR age < 30
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"shop\" (\n\"Shop_ID\" int,\n\"Address\" text,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "shop" ( "Shop_ID" int, "Address" text, "Num_of_staff" text, "Score" real, "Open_Year" text, PRIMARY KEY ("Shop_ID") ) CREATE TABLE "member" ( "Member_ID" int, "Name" text, "Membership_card" text, "Age" int, "Time_of_purchase" int, "Level_of_membership" int, "Address" text, PRIMARY KEY...
SELECT Time_of_purchase , age , address FROM member ORDER BY Time_of_purchase
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"shop\" (\n\"Shop_ID\" int,\n\"Address\" text,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "shop" ( "Shop_ID" int, "Address" text, "Num_of_staff" text, "Score" real, "Open_Year" text, PRIMARY KEY ("Shop_ID") ) CREATE TABLE "member" ( "Member_ID" int, "Name" text, "Membership_card" text, "Age" int, "Time_of_purchase" int, "Level_of_membership" int, "Address" text, PRIMARY KEY...
SELECT Membership_card FROM member GROUP BY Membership_card HAVING count(*) > 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 \"shop\" (\n\"Shop_ID\" int,\n\"Address\" text,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "shop" ( "Shop_ID" int, "Address" text, "Num_of_staff" text, "Score" real, "Open_Year" text, PRIMARY KEY ("Shop_ID") ) CREATE TABLE "member" ( "Member_ID" int, "Name" text, "Membership_card" text, "Age" int, "Time_of_purchase" int, "Level_of_membership" int, "Address" text, PRIMARY KEY...
SELECT address FROM member WHERE age < 30 INTERSECT SELECT address FROM member WHERE age > 40
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"shop\" (\n\"Shop_ID\" int,\n\"Address\" text,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "shop" ( "Shop_ID" int, "Address" text, "Num_of_staff" text, "Score" real, "Open_Year" text, PRIMARY KEY ("Shop_ID") ) CREATE TABLE "member" ( "Member_ID" int, "Name" text, "Membership_card" text, "Age" int, "Time_of_purchase" int, "Level_of_membership" int, "Address" text, PRIMARY KEY...
SELECT membership_card FROM member WHERE address = 'Hartford' INTERSECT SELECT membership_card FROM member WHERE address = 'Waterbury'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"shop\" (\n\"Shop_ID\" int,\n\"Address\" text,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "shop" ( "Shop_ID" int, "Address" text, "Num_of_staff" text, "Score" real, "Open_Year" text, PRIMARY KEY ("Shop_ID") ) CREATE TABLE "member" ( "Member_ID" int, "Name" text, "Membership_card" text, "Age" int, "Time_of_purchase" int, "Level_of_membership" int, "Address" text, PRIMARY KEY...
SELECT count(*) FROM member WHERE address != 'Hartford'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"shop\" (\n\"Shop_ID\" int,\n\"Address\" text,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "shop" ( "Shop_ID" int, "Address" text, "Num_of_staff" text, "Score" real, "Open_Year" text, PRIMARY KEY ("Shop_ID") ) CREATE TABLE "member" ( "Member_ID" int, "Name" text, "Membership_card" text, "Age" int, "Time_of_purchase" int, "Level_of_membership" int, "Address" text, PRIMARY KEY...
SELECT address FROM member EXCEPT SELECT address FROM member WHERE Membership_card = 'Black'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"shop\" (\n\"Shop_ID\" int,\n\"Address\" text,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "shop" ( "Shop_ID" int, "Address" text, "Num_of_staff" text, "Score" real, "Open_Year" text, PRIMARY KEY ("Shop_ID") ) CREATE TABLE "member" ( "Member_ID" int, "Name" text, "Membership_card" text, "Age" int, "Time_of_purchase" int, "Level_of_membership" int, "Address" text, PRIMARY KEY...
SELECT address FROM shop ORDER BY open_year