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 \"city\" (\n\"City_ID\" int,\n\"City\" 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 "city" ( "City_ID" int, "City" text, "Hanzi" text, "Hanyu_Pinyin" text, "Regional_Population" int, "GDP" real, PRIMARY KEY ("City_ID") ) CREATE TABLE "match" ( "Match_ID" int, "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text, PRIMARY KEY ("Match_ID") ) CREATE...
SELECT count(*) , Competition FROM MATCH GROUP BY Competition
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"city\" (\n\"City_ID\" int,\n\"City\" 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 "city" ( "City_ID" int, "City" text, "Hanzi" text, "Hanyu_Pinyin" text, "Regional_Population" int, "GDP" real, PRIMARY KEY ("City_ID") ) CREATE TABLE "match" ( "Match_ID" int, "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text, PRIMARY KEY ("Match_ID") ) CREATE...
SELECT count(*) , Competition FROM MATCH GROUP BY Competition
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"city\" (\n\"City_ID\" int,\n\"City\" 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 "city" ( "City_ID" int, "City" text, "Hanzi" text, "Hanyu_Pinyin" text, "Regional_Population" int, "GDP" real, PRIMARY KEY ("City_ID") ) CREATE TABLE "match" ( "Match_ID" int, "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text, PRIMARY KEY ("Match_ID") ) CREATE...
SELECT venue FROM MATCH ORDER BY date DESC
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"city\" (\n\"City_ID\" int,\n\"City\" 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 "city" ( "City_ID" int, "City" text, "Hanzi" text, "Hanyu_Pinyin" text, "Regional_Population" int, "GDP" real, PRIMARY KEY ("City_ID") ) CREATE TABLE "match" ( "Match_ID" int, "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text, PRIMARY KEY ("Match_ID") ) CREATE...
SELECT venue FROM MATCH ORDER BY date DESC
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"city\" (\n\"City_ID\" int,\n\"City\" 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 "city" ( "City_ID" int, "City" text, "Hanzi" text, "Hanyu_Pinyin" text, "Regional_Population" int, "GDP" real, PRIMARY KEY ("City_ID") ) CREATE TABLE "match" ( "Match_ID" int, "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text, PRIMARY KEY ("Match_ID") ) CREATE...
SELECT gdp FROM city ORDER BY Regional_Population 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 \"city\" (\n\"City_ID\" int,\n\"City\" 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 "city" ( "City_ID" int, "City" text, "Hanzi" text, "Hanyu_Pinyin" text, "Regional_Population" int, "GDP" real, PRIMARY KEY ("City_ID") ) CREATE TABLE "match" ( "Match_ID" int, "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text, PRIMARY KEY ("Match_ID") ) CREATE...
SELECT gdp FROM city ORDER BY Regional_Population 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 \"city\" (\n\"City_ID\" int,\n\"City\" 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 "city" ( "City_ID" int, "City" text, "Hanzi" text, "Hanyu_Pinyin" text, "Regional_Population" int, "GDP" real, PRIMARY KEY ("City_ID") ) CREATE TABLE "match" ( "Match_ID" int, "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text, PRIMARY KEY ("Match_ID") ) CREATE...
SELECT t1.gdp , t1.Regional_Population FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY t2.Host_City 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 \"city\" (\n\"City_ID\" int,\n\"City\" 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 "city" ( "City_ID" int, "City" text, "Hanzi" text, "Hanyu_Pinyin" text, "Regional_Population" int, "GDP" real, PRIMARY KEY ("City_ID") ) CREATE TABLE "match" ( "Match_ID" int, "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text, PRIMARY KEY ("Match_ID") ) CREATE...
SELECT t1.gdp , t1.Regional_Population FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY t2.Host_City 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT individual_first_name , individual_middle_name , individual_last_name FROM individuals ORDER BY individual_last_name
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT individual_first_name , individual_middle_name , individual_last_name FROM individuals ORDER BY individual_last_name
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT DISTINCT form_type_code FROM forms
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT DISTINCT form_type_code FROM forms
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT t1.form_name FROM forms AS t1 JOIN party_forms AS t2 ON t1.form_id = t2.form_id GROUP BY t2.form_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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT t1.form_name FROM forms AS t1 JOIN party_forms AS t2 ON t1.form_id = t2.form_id GROUP BY t2.form_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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT payment_method_code , party_phone FROM parties WHERE party_email = "enrico09@example.com"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT payment_method_code , party_phone FROM parties WHERE party_email = "enrico09@example.com"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT t1.party_email FROM parties AS t1 JOIN party_forms AS t2 ON t1.party_id = t2.party_id WHERE t2.form_id = (SELECT form_id FROM party_forms GROUP BY form_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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT t1.party_email FROM parties AS t1 JOIN party_forms AS t2 ON t1.party_id = t2.party_id WHERE t2.form_id = (SELECT form_id FROM party_forms GROUP BY form_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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT organization_name FROM organizations ORDER BY date_formed 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT organization_name FROM organizations ORDER BY date_formed 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT organization_name FROM organizations ORDER BY date_formed 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT organization_name FROM organizations ORDER BY date_formed 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.organization_name = "Labour Party" ORDER BY t2.date_contact_to 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.organization_name = "Labour Party" ORDER BY t2.date_contact_to 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.uk_vat_number = (SELECT max(uk_vat_number) FROM organizations) ORDER BY t2.date_contact_to ASC LIMIT...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.uk_vat_number = (SELECT max(uk_vat_number) FROM organizations) ORDER BY t2.date_contact_to ASC LIMIT...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT count(*) FROM services
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT count(*) FROM services
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT service_name FROM services EXCEPT SELECT t1.service_name FROM services AS t1 JOIN party_services AS t2 ON t1.service_id = t2.service_id
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT service_name FROM services EXCEPT SELECT t1.service_name FROM services AS t1 JOIN party_services AS t2 ON t1.service_id = t2.service_id
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT count(*) FROM addresses WHERE state_province_county = "Colorado"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT count(*) FROM addresses WHERE state_province_county = "Colorado"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING count(*) > 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING count(*) > 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT organization_name FROM organizations WHERE organization_name LIKE "%Party%"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT organization_name FROM organizations WHERE organization_name LIKE "%Party%"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT count(DISTINCT payment_method_code) FROM parties
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT count(DISTINCT payment_method_code) FROM parties
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT t1.party_email FROM parties AS t1 JOIN party_services AS t2 ON t1.party_id = t2.customer_id GROUP BY t1.party_email 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT t1.party_email FROM parties AS t1 JOIN party_services AS t2 ON t1.party_id = t2.customer_id GROUP BY t1.party_email 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT state_province_county FROM addresses WHERE line_1_number_building LIKE "%6862 Kaitlyn Knolls%"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT state_province_county FROM addresses WHERE line_1_number_building LIKE "%6862 Kaitlyn Knolls%"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT t1.organization_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id GROUP BY t1.organization_name 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT t1.organization_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id GROUP BY t1.organization_name 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_id
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1_number_building` VARCHAR(80), `town_city` VARCHAR(50), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(50), `country` VARCHAR(50) ) CREATE TABLE `Services` ( `service_id` INTEGER PRIMARY KEY, `service_type_code` VARCHA...
SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_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 \"driver\" (\n\"Driver_ID\" int,\n\"Name\" 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 "driver" ( "Driver_ID" int, "Name" text, "Party" text, "Home_city" text, "Age" int, PRIMARY KEY ("Driver_ID") ) CREATE TABLE "school" ( "School_ID" int, "Grade" text, "School" text, "Location" text, "Type" text, PRIMARY KEY ("School_ID") ) CREATE TABLE "school_bus" ( "School_ID" int, ...
SELECT count(*) FROM driver
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"driver\" (\n\"Driver_ID\" int,\n\"Name\" 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 "driver" ( "Driver_ID" int, "Name" text, "Party" text, "Home_city" text, "Age" int, PRIMARY KEY ("Driver_ID") ) CREATE TABLE "school" ( "School_ID" int, "Grade" text, "School" text, "Location" text, "Type" text, PRIMARY KEY ("School_ID") ) CREATE TABLE "school_bus" ( "School_ID" int, ...
SELECT name , home_city , age FROM driver
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"driver\" (\n\"Driver_ID\" int,\n\"Name\" 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 "driver" ( "Driver_ID" int, "Name" text, "Party" text, "Home_city" text, "Age" int, PRIMARY KEY ("Driver_ID") ) CREATE TABLE "school" ( "School_ID" int, "Grade" text, "School" text, "Location" text, "Type" text, PRIMARY KEY ("School_ID") ) CREATE TABLE "school_bus" ( "School_ID" int, ...
SELECT party , count(*) FROM driver GROUP BY party
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"driver\" (\n\"Driver_ID\" int,\n\"Name\" 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 "driver" ( "Driver_ID" int, "Name" text, "Party" text, "Home_city" text, "Age" int, PRIMARY KEY ("Driver_ID") ) CREATE TABLE "school" ( "School_ID" int, "Grade" text, "School" text, "Location" text, "Type" text, PRIMARY KEY ("School_ID") ) CREATE TABLE "school_bus" ( "School_ID" int, ...
SELECT name FROM driver ORDER BY age DESC
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"driver\" (\n\"Driver_ID\" int,\n\"Name\" 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 "driver" ( "Driver_ID" int, "Name" text, "Party" text, "Home_city" text, "Age" int, PRIMARY KEY ("Driver_ID") ) CREATE TABLE "school" ( "School_ID" int, "Grade" text, "School" text, "Location" text, "Type" text, PRIMARY KEY ("School_ID") ) CREATE TABLE "school_bus" ( "School_ID" int, ...
SELECT DISTINCT home_city FROM driver
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"driver\" (\n\"Driver_ID\" int,\n\"Name\" 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 "driver" ( "Driver_ID" int, "Name" text, "Party" text, "Home_city" text, "Age" int, PRIMARY KEY ("Driver_ID") ) CREATE TABLE "school" ( "School_ID" int, "Grade" text, "School" text, "Location" text, "Type" text, PRIMARY KEY ("School_ID") ) CREATE TABLE "school_bus" ( "School_ID" int, ...
SELECT home_city FROM driver GROUP BY home_city 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 \"driver\" (\n\"Driver_ID\" int,\n\"Name\" 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 "driver" ( "Driver_ID" int, "Name" text, "Party" text, "Home_city" text, "Age" int, PRIMARY KEY ("Driver_ID") ) CREATE TABLE "school" ( "School_ID" int, "Grade" text, "School" text, "Location" text, "Type" text, PRIMARY KEY ("School_ID") ) CREATE TABLE "school_bus" ( "School_ID" int, ...
SELECT party FROM driver WHERE home_city = 'Hartford' AND 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 \"driver\" (\n\"Driver_ID\" int,\n\"Name\" 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 "driver" ( "Driver_ID" int, "Name" text, "Party" text, "Home_city" text, "Age" int, PRIMARY KEY ("Driver_ID") ) CREATE TABLE "school" ( "School_ID" int, "Grade" text, "School" text, "Location" text, "Type" text, PRIMARY KEY ("School_ID") ) CREATE TABLE "school_bus" ( "School_ID" int, ...
SELECT home_city FROM driver WHERE age > 40 GROUP BY home_city 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 \"driver\" (\n\"Driver_ID\" int,\n\"Name\" 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 "driver" ( "Driver_ID" int, "Name" text, "Party" text, "Home_city" text, "Age" int, PRIMARY KEY ("Driver_ID") ) CREATE TABLE "school" ( "School_ID" int, "Grade" text, "School" text, "Location" text, "Type" text, PRIMARY KEY ("School_ID") ) CREATE TABLE "school_bus" ( "School_ID" int, ...
SELECT home_city FROM driver EXCEPT SELECT home_city FROM driver 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 \"driver\" (\n\"Driver_ID\" int,\n\"Name\" 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 "driver" ( "Driver_ID" int, "Name" text, "Party" text, "Home_city" text, "Age" int, PRIMARY KEY ("Driver_ID") ) CREATE TABLE "school" ( "School_ID" int, "Grade" text, "School" text, "Location" text, "Type" text, PRIMARY KEY ("School_ID") ) CREATE TABLE "school_bus" ( "School_ID" int, ...
SELECT name FROM driver WHERE driver_id NOT IN (SELECT driver_id FROM school_bus)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"driver\" (\n\"Driver_ID\" int,\n\"Name\" 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 "driver" ( "Driver_ID" int, "Name" text, "Party" text, "Home_city" text, "Age" int, PRIMARY KEY ("Driver_ID") ) CREATE TABLE "school" ( "School_ID" int, "Grade" text, "School" text, "Location" text, "Type" text, PRIMARY KEY ("School_ID") ) CREATE TABLE "school_bus" ( "School_ID" int, ...
SELECT TYPE FROM school GROUP BY TYPE 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 \"driver\" (\n\"Driver_ID\" int,\n\"Name\" 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 "driver" ( "Driver_ID" int, "Name" text, "Party" text, "Home_city" text, "Age" int, PRIMARY KEY ("Driver_ID") ) CREATE TABLE "school" ( "School_ID" int, "Grade" text, "School" text, "Location" text, "Type" text, PRIMARY KEY ("School_ID") ) CREATE TABLE "school_bus" ( "School_ID" int, ...
SELECT T2.school , T3.name FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id JOIN driver AS T3 ON T1.driver_id = T3.driver_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 \"driver\" (\n\"Driver_ID\" int,\n\"Name\" 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 "driver" ( "Driver_ID" int, "Name" text, "Party" text, "Home_city" text, "Age" int, PRIMARY KEY ("Driver_ID") ) CREATE TABLE "school" ( "School_ID" int, "Grade" text, "School" text, "Location" text, "Type" text, PRIMARY KEY ("School_ID") ) CREATE TABLE "school_bus" ( "School_ID" int, ...
SELECT max(years_working) , min(years_working) , avg(years_working) FROM school_bus
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"driver\" (\n\"Driver_ID\" int,\n\"Name\" 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 "driver" ( "Driver_ID" int, "Name" text, "Party" text, "Home_city" text, "Age" int, PRIMARY KEY ("Driver_ID") ) CREATE TABLE "school" ( "School_ID" int, "Grade" text, "School" text, "Location" text, "Type" text, PRIMARY KEY ("School_ID") ) CREATE TABLE "school_bus" ( "School_ID" int, ...
SELECT school , TYPE FROM school WHERE school_id NOT IN (SELECT school_id FROM school_bus)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"driver\" (\n\"Driver_ID\" int,\n\"Name\" 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 "driver" ( "Driver_ID" int, "Name" text, "Party" text, "Home_city" text, "Age" int, PRIMARY KEY ("Driver_ID") ) CREATE TABLE "school" ( "School_ID" int, "Grade" text, "School" text, "Location" text, "Type" text, PRIMARY KEY ("School_ID") ) CREATE TABLE "school_bus" ( "School_ID" int, ...
SELECT T2.type , count(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T2.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 \"driver\" (\n\"Driver_ID\" int,\n\"Name\" 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 "driver" ( "Driver_ID" int, "Name" text, "Party" text, "Home_city" text, "Age" int, PRIMARY KEY ("Driver_ID") ) CREATE TABLE "school" ( "School_ID" int, "Grade" text, "School" text, "Location" text, "Type" text, PRIMARY KEY ("School_ID") ) CREATE TABLE "school_bus" ( "School_ID" int, ...
SELECT count(*) FROM driver WHERE home_city = 'Hartford' OR 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 \"driver\" (\n\"Driver_ID\" int,\n\"Name\" 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 "driver" ( "Driver_ID" int, "Name" text, "Party" text, "Home_city" text, "Age" int, PRIMARY KEY ("Driver_ID") ) CREATE TABLE "school" ( "School_ID" int, "Grade" text, "School" text, "Location" text, "Type" text, PRIMARY KEY ("School_ID") ) CREATE TABLE "school_bus" ( "School_ID" int, ...
SELECT name FROM driver WHERE home_city = 'Hartford' AND 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 \"driver\" (\n\"Driver_ID\" int,\n\"Name\" 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 "driver" ( "Driver_ID" int, "Name" text, "Party" text, "Home_city" text, "Age" int, PRIMARY KEY ("Driver_ID") ) CREATE TABLE "school" ( "School_ID" int, "Grade" text, "School" text, "Location" text, "Type" text, PRIMARY KEY ("School_ID") ) CREATE TABLE "school_bus" ( "School_ID" int, ...
SELECT t1.name FROM driver AS t1 JOIN school_bus AS t2 ON t1.driver_id = t2.driver_id ORDER BY years_working 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 \"airport\" (\n\"id\" int,\n\"City\" text,\n\"Co...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "airport" ( "id" int, "City" text, "Country" text, "IATA" text, "ICAO" text, "name" text, primary key("id") ) CREATE TABLE "operate_company" ( "id" int, "name" text, "Type" text, "Principal_activities" text, "Incorporated_in" text, "Group_Equity_Shareholding" real, primary key ("id") )...
SELECT count(*) FROM flight WHERE velocity > 200
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"airport\" (\n\"id\" int,\n\"City\" text,\n\"Co...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "airport" ( "id" int, "City" text, "Country" text, "IATA" text, "ICAO" text, "name" text, primary key("id") ) CREATE TABLE "operate_company" ( "id" int, "name" text, "Type" text, "Principal_activities" text, "Incorporated_in" text, "Group_Equity_Shareholding" real, primary key ("id") )...
SELECT vehicle_flight_number , date , pilot FROM flight ORDER BY altitude 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 \"airport\" (\n\"id\" int,\n\"City\" text,\n\"Co...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "airport" ( "id" int, "City" text, "Country" text, "IATA" text, "ICAO" text, "name" text, primary key("id") ) CREATE TABLE "operate_company" ( "id" int, "name" text, "Type" text, "Principal_activities" text, "Incorporated_in" text, "Group_Equity_Shareholding" real, primary key ("id") )...
SELECT id , country , city , name FROM airport ORDER BY name
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"airport\" (\n\"id\" int,\n\"City\" text,\n\"Co...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "airport" ( "id" int, "City" text, "Country" text, "IATA" text, "ICAO" text, "name" text, primary key("id") ) CREATE TABLE "operate_company" ( "id" int, "name" text, "Type" text, "Principal_activities" text, "Incorporated_in" text, "Group_Equity_Shareholding" real, primary key ("id") )...
SELECT max(group_equity_shareholding) FROM operate_company
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"airport\" (\n\"id\" int,\n\"City\" text,\n\"Co...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "airport" ( "id" int, "City" text, "Country" text, "IATA" text, "ICAO" text, "name" text, primary key("id") ) CREATE TABLE "operate_company" ( "id" int, "name" text, "Type" text, "Principal_activities" text, "Incorporated_in" text, "Group_Equity_Shareholding" real, primary key ("id") )...
SELECT avg(velocity) FROM flight WHERE pilot = 'Thompson'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"airport\" (\n\"id\" int,\n\"City\" text,\n\"Co...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "airport" ( "id" int, "City" text, "Country" text, "IATA" text, "ICAO" text, "name" text, primary key("id") ) CREATE TABLE "operate_company" ( "id" int, "name" text, "Type" text, "Principal_activities" text, "Incorporated_in" text, "Group_Equity_Shareholding" real, primary key ("id") )...
SELECT T1.name , T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_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 \"airport\" (\n\"id\" int,\n\"City\" text,\n\"Co...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "airport" ( "id" int, "City" text, "Country" text, "IATA" text, "ICAO" text, "name" text, primary key("id") ) CREATE TABLE "operate_company" ( "id" int, "name" text, "Type" text, "Principal_activities" text, "Incorporated_in" text, "Group_Equity_Shareholding" real, primary key ("id") )...
SELECT name FROM airport WHERE country != 'Iceland'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"airport\" (\n\"id\" int,\n\"City\" text,\n\"Co...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "airport" ( "id" int, "City" text, "Country" text, "IATA" text, "ICAO" text, "name" text, primary key("id") ) CREATE TABLE "operate_company" ( "id" int, "name" text, "Type" text, "Principal_activities" text, "Incorporated_in" text, "Group_Equity_Shareholding" real, primary key ("id") )...
SELECT DISTINCT T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T2.velocity < 200
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"airport\" (\n\"id\" int,\n\"City\" text,\n\"Co...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "airport" ( "id" int, "City" text, "Country" text, "IATA" text, "ICAO" text, "name" text, primary key("id") ) CREATE TABLE "operate_company" ( "id" int, "name" text, "Type" text, "Principal_activities" text, "Incorporated_in" text, "Group_Equity_Shareholding" real, primary key ("id") )...
SELECT T1.id , T1.name FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id GROUP BY T1.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 \"airport\" (\n\"id\" int,\n\"City\" text,\n\"Co...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "airport" ( "id" int, "City" text, "Country" text, "IATA" text, "ICAO" text, "name" text, primary key("id") ) CREATE TABLE "operate_company" ( "id" int, "name" text, "Type" text, "Principal_activities" text, "Incorporated_in" text, "Group_Equity_Shareholding" real, primary key ("id") )...
SELECT T1.id , T1.name , T1.IATA FROM airport AS T1 JOIN flight AS T2 ON T1.id = T2.airport_id GROUP BY T2.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 \"airport\" (\n\"id\" int,\n\"City\" text,\n\"Co...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "airport" ( "id" int, "City" text, "Country" text, "IATA" text, "ICAO" text, "name" text, primary key("id") ) CREATE TABLE "operate_company" ( "id" int, "name" text, "Type" text, "Principal_activities" text, "Incorporated_in" text, "Group_Equity_Shareholding" real, primary key ("id") )...
SELECT DISTINCT T2.pilot FROM airport AS T1 JOIN flight AS T2 ON T1.id = T2.airport_id WHERE T1.country = 'United States' OR T1.name = 'Billund Airport'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"airport\" (\n\"id\" int,\n\"City\" text,\n\"Co...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "airport" ( "id" int, "City" text, "Country" text, "IATA" text, "ICAO" text, "name" text, primary key("id") ) CREATE TABLE "operate_company" ( "id" int, "name" text, "Type" text, "Principal_activities" text, "Incorporated_in" text, "Group_Equity_Shareholding" real, primary key ("id") )...
SELECT TYPE , count(*) FROM operate_company GROUP BY TYPE 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 \"airport\" (\n\"id\" int,\n\"City\" text,\n\"Co...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "airport" ( "id" int, "City" text, "Country" text, "IATA" text, "ICAO" text, "name" text, primary key("id") ) CREATE TABLE "operate_company" ( "id" int, "name" text, "Type" text, "Principal_activities" text, "Incorporated_in" text, "Group_Equity_Shareholding" real, primary key ("id") )...
SELECT count(*) FROM airport WHERE id NOT IN ( SELECT airport_id FROM flight WHERE pilot = 'Thompson' );
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"airport\" (\n\"id\" int,\n\"City\" text,\n\"Co...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "airport" ( "id" int, "City" text, "Country" text, "IATA" text, "ICAO" text, "name" text, primary key("id") ) CREATE TABLE "operate_company" ( "id" int, "name" text, "Type" text, "Principal_activities" text, "Incorporated_in" text, "Group_Equity_Shareholding" real, primary key ("id") )...
SELECT T2.pilot FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T1.principal_activities = 'Cargo' INTERSECT SELECT T2.pilot FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T1.principal_activities = 'Catering services'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"airport\" (\n\"id\" int,\n\"City\" text,\n\"Co...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "airport" ( "id" int, "City" text, "Country" text, "IATA" text, "ICAO" text, "name" text, primary key("id") ) CREATE TABLE "operate_company" ( "id" int, "name" text, "Type" text, "Principal_activities" text, "Incorporated_in" text, "Group_Equity_Shareholding" real, primary key ("id") )...
SELECT name FROM airport WHERE name LIKE '%international%'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"airport\" (\n\"id\" int,\n\"City\" text,\n\"Co...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "airport" ( "id" int, "City" text, "Country" text, "IATA" text, "ICAO" text, "name" text, primary key("id") ) CREATE TABLE "operate_company" ( "id" int, "name" text, "Type" text, "Principal_activities" text, "Incorporated_in" text, "Group_Equity_Shareholding" real, primary key ("id") )...
SELECT T3.id , count(*) FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id JOIN airport AS T3 ON T2.airport_id = T3.id GROUP BY T3.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 \"airport\" (\n\"id\" int,\n\"City\" text,\n\"Co...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "airport" ( "id" int, "City" text, "Country" text, "IATA" text, "ICAO" text, "name" text, primary key("id") ) CREATE TABLE "operate_company" ( "id" int, "name" text, "Type" text, "Principal_activities" text, "Incorporated_in" text, "Group_Equity_Shareholding" real, primary key ("id") )...
SELECT count(*) , country FROM airport GROUP BY country
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"airport\" (\n\"id\" int,\n\"City\" text,\n\"Co...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "airport" ( "id" int, "City" text, "Country" text, "IATA" text, "ICAO" text, "name" text, primary key("id") ) CREATE TABLE "operate_company" ( "id" int, "name" text, "Type" text, "Principal_activities" text, "Incorporated_in" text, "Group_Equity_Shareholding" real, primary key ("id") )...
SELECT country FROM airport GROUP BY country 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 \"airport\" (\n\"id\" int,\n\"City\" text,\n\"Co...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "airport" ( "id" int, "City" text, "Country" text, "IATA" text, "ICAO" text, "name" text, primary key("id") ) CREATE TABLE "operate_company" ( "id" int, "name" text, "Type" text, "Principal_activities" text, "Incorporated_in" text, "Group_Equity_Shareholding" real, primary key ("id") )...
SELECT pilot FROM flight GROUP BY pilot 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 Ref_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15) NOT NULL, Budget_Type_Description VARCHAR(2...
SELECT count(*) FROM Accounts
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15) NOT NULL, Budget_Type_Description VARCHAR(2...
SELECT count(*) FROM Accounts
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15) NOT NULL, Budget_Type_Description VARCHAR(2...
SELECT account_id , account_details FROM Accounts
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15) NOT NULL, Budget_Type_Description VARCHAR(2...
SELECT account_id , account_details FROM Accounts
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15) NOT NULL, Budget_Type_Description VARCHAR(2...
SELECT count(*) FROM Statements
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15) NOT NULL, Budget_Type_Description VARCHAR(2...
SELECT count(*) FROM Statements
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15) NOT NULL, Budget_Type_Description VARCHAR(2...
SELECT STATEMENT_ID , statement_details FROM Statements
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15) NOT NULL, Budget_Type_Description VARCHAR(2...
SELECT STATEMENT_ID , statement_details FROM Statements
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15) NOT NULL, Budget_Type_Description VARCHAR(2...
SELECT T1.statement_id , T2.statement_details , T1.account_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15) NOT NULL, Budget_Type_Description VARCHAR(2...
SELECT T1.statement_id , T2.statement_details , T1.account_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15) NOT NULL, Budget_Type_Description VARCHAR(2...
SELECT STATEMENT_ID , count(*) FROM Accounts GROUP BY STATEMENT_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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15) NOT NULL, Budget_Type_Description VARCHAR(2...
SELECT STATEMENT_ID , count(*) FROM Accounts GROUP BY STATEMENT_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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15) NOT NULL, Budget_Type_Description VARCHAR(2...
SELECT T1.statement_id , T2.statement_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id GROUP BY T1.statement_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 Ref_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15) NOT NULL, Budget_Type_Description VARCHAR(2...
SELECT T1.statement_id , T2.statement_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id GROUP BY T1.statement_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 Ref_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15) NOT NULL, Budget_Type_Description VARCHAR(2...
SELECT count(*) FROM Documents