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 `item` (\n `i_id` integer NOT NULL\n, `title` ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `item` ( `i_id` integer NOT NULL , `title` varchar(20) DEFAULT NULL , PRIMARY KEY (`i_id`) ) CREATE TABLE `review` ( `a_id` integer NOT NULL PRIMARY KEY , `u_id` integer NOT NULL , `i_id` integer NOT NULL , `rating` integer DEFAULT NULL , `rank` integer DEFAULT NULL , FOREIG...
SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating > (SELECT avg(rating) FROM review)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `item` (\n `i_id` integer NOT NULL\n, `title` ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `item` ( `i_id` integer NOT NULL , `title` varchar(20) DEFAULT NULL , PRIMARY KEY (`i_id`) ) CREATE TABLE `review` ( `a_id` integer NOT NULL PRIMARY KEY , `u_id` integer NOT NULL , `i_id` integer NOT NULL , `rating` integer DEFAULT NULL , `rank` integer DEFAULT NULL , FOREIG...
SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating < 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 `item` (\n `i_id` integer NOT NULL\n, `title` ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `item` ( `i_id` integer NOT NULL , `title` varchar(20) DEFAULT NULL , PRIMARY KEY (`i_id`) ) CREATE TABLE `review` ( `a_id` integer NOT NULL PRIMARY KEY , `u_id` integer NOT NULL , `i_id` integer NOT NULL , `rating` integer DEFAULT NULL , `rank` integer DEFAULT NULL , FOREIG...
SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating > 8 INTERSECT SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating < 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 `item` (\n `i_id` integer NOT NULL\n, `title` ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `item` ( `i_id` integer NOT NULL , `title` varchar(20) DEFAULT NULL , PRIMARY KEY (`i_id`) ) CREATE TABLE `review` ( `a_id` integer NOT NULL PRIMARY KEY , `u_id` integer NOT NULL , `i_id` integer NOT NULL , `rating` integer DEFAULT NULL , `rank` integer DEFAULT NULL , FOREIG...
SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rank > 3 INTERSECT SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id HAVING avg(T2.rating) > 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 `item` (\n `i_id` integer NOT NULL\n, `title` ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `item` ( `i_id` integer NOT NULL , `title` varchar(20) DEFAULT NULL , PRIMARY KEY (`i_id`) ) CREATE TABLE `review` ( `a_id` integer NOT NULL PRIMARY KEY , `u_id` integer NOT NULL , `i_id` integer NOT NULL , `rating` integer DEFAULT NULL , `rank` integer DEFAULT NULL , FOREIG...
SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY avg(T2.rating) 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 `item` (\n `i_id` integer NOT NULL\n, `title` ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `item` ( `i_id` integer NOT NULL , `title` varchar(20) DEFAULT NULL , PRIMARY KEY (`i_id`) ) CREATE TABLE `review` ( `a_id` integer NOT NULL PRIMARY KEY , `u_id` integer NOT NULL , `i_id` integer NOT NULL , `rating` integer DEFAULT NULL , `rank` integer DEFAULT NULL , FOREIG...
SELECT title FROM item ORDER BY title
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `item` (\n `i_id` integer NOT NULL\n, `title` ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `item` ( `i_id` integer NOT NULL , `title` varchar(20) DEFAULT NULL , PRIMARY KEY (`i_id`) ) CREATE TABLE `review` ( `a_id` integer NOT NULL PRIMARY KEY , `u_id` integer NOT NULL , `i_id` integer NOT NULL , `rating` integer DEFAULT NULL , `rank` integer DEFAULT NULL , FOREIG...
SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_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 `item` (\n `i_id` integer NOT NULL\n, `title` ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `item` ( `i_id` integer NOT NULL , `title` varchar(20) DEFAULT NULL , PRIMARY KEY (`i_id`) ) CREATE TABLE `review` ( `a_id` integer NOT NULL PRIMARY KEY , `u_id` integer NOT NULL , `i_id` integer NOT NULL , `rating` integer DEFAULT NULL , `rank` integer DEFAULT NULL , FOREIG...
SELECT T1.title , T1.i_id FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY avg(T2.rating) 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 `item` (\n `i_id` integer NOT NULL\n, `title` ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `item` ( `i_id` integer NOT NULL , `title` varchar(20) DEFAULT NULL , PRIMARY KEY (`i_id`) ) CREATE TABLE `review` ( `a_id` integer NOT NULL PRIMARY KEY , `u_id` integer NOT NULL , `i_id` integer NOT NULL , `rating` integer DEFAULT NULL , `rank` integer DEFAULT NULL , FOREIG...
SELECT T1.title , T1.i_id FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY avg(T2.rank) 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 `item` (\n `i_id` integer NOT NULL\n, `title` ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `item` ( `i_id` integer NOT NULL , `title` varchar(20) DEFAULT NULL , PRIMARY KEY (`i_id`) ) CREATE TABLE `review` ( `a_id` integer NOT NULL PRIMARY KEY , `u_id` integer NOT NULL , `i_id` integer NOT NULL , `rating` integer DEFAULT NULL , `rank` integer DEFAULT NULL , FOREIG...
SELECT T1.name , avg(T2.rating) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_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 `item` (\n `i_id` integer NOT NULL\n, `title` ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `item` ( `i_id` integer NOT NULL , `title` varchar(20) DEFAULT NULL , PRIMARY KEY (`i_id`) ) CREATE TABLE `review` ( `a_id` integer NOT NULL PRIMARY KEY , `u_id` integer NOT NULL , `i_id` integer NOT NULL , `rating` integer DEFAULT NULL , `rank` integer DEFAULT NULL , FOREIG...
SELECT T1.name , count(*) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_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 `item` (\n `i_id` integer NOT NULL\n, `title` ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `item` ( `i_id` integer NOT NULL , `title` varchar(20) DEFAULT NULL , PRIMARY KEY (`i_id`) ) CREATE TABLE `review` ( `a_id` integer NOT NULL PRIMARY KEY , `u_id` integer NOT NULL , `i_id` integer NOT NULL , `rating` integer DEFAULT NULL , `rank` integer DEFAULT NULL , FOREIG...
SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id ORDER BY T2.rating 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 `item` (\n `i_id` integer NOT NULL\n, `title` ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `item` ( `i_id` integer NOT NULL , `title` varchar(20) DEFAULT NULL , PRIMARY KEY (`i_id`) ) CREATE TABLE `review` ( `a_id` integer NOT NULL PRIMARY KEY , `u_id` integer NOT NULL , `i_id` integer NOT NULL , `rating` integer DEFAULT NULL , `rank` integer DEFAULT NULL , FOREIG...
SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.source_u_id GROUP BY T2.source_u_id ORDER BY avg(trust) 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 `item` (\n `i_id` integer NOT NULL\n, `title` ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `item` ( `i_id` integer NOT NULL , `title` varchar(20) DEFAULT NULL , PRIMARY KEY (`i_id`) ) CREATE TABLE `review` ( `a_id` integer NOT NULL PRIMARY KEY , `u_id` integer NOT NULL , `i_id` integer NOT NULL , `rating` integer DEFAULT NULL , `rank` integer DEFAULT NULL , FOREIG...
SELECT T1.name , avg(trust) FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id GROUP BY T2.target_u_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 `item` (\n `i_id` integer NOT NULL\n, `title` ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `item` ( `i_id` integer NOT NULL , `title` varchar(20) DEFAULT NULL , PRIMARY KEY (`i_id`) ) CREATE TABLE `review` ( `a_id` integer NOT NULL PRIMARY KEY , `u_id` integer NOT NULL , `i_id` integer NOT NULL , `rating` integer DEFAULT NULL , `rank` integer DEFAULT NULL , FOREIG...
SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id ORDER BY trust 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 `item` (\n `i_id` integer NOT NULL\n, `title` ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `item` ( `i_id` integer NOT NULL , `title` varchar(20) DEFAULT NULL , PRIMARY KEY (`i_id`) ) CREATE TABLE `review` ( `a_id` integer NOT NULL PRIMARY KEY , `u_id` integer NOT NULL , `i_id` integer NOT NULL , `rating` integer DEFAULT NULL , `rank` integer DEFAULT NULL , FOREIG...
SELECT title FROM item WHERE i_id NOT IN (SELECT i_id FROM review)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `item` (\n `i_id` integer NOT NULL\n, `title` ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `item` ( `i_id` integer NOT NULL , `title` varchar(20) DEFAULT NULL , PRIMARY KEY (`i_id`) ) CREATE TABLE `review` ( `a_id` integer NOT NULL PRIMARY KEY , `u_id` integer NOT NULL , `i_id` integer NOT NULL , `rating` integer DEFAULT NULL , `rank` integer DEFAULT NULL , FOREIG...
SELECT name FROM useracct WHERE u_id NOT IN (SELECT u_id FROM review)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `item` (\n `i_id` integer NOT NULL\n, `title` ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `item` ( `i_id` integer NOT NULL , `title` varchar(20) DEFAULT NULL , PRIMARY KEY (`i_id`) ) CREATE TABLE `review` ( `a_id` integer NOT NULL PRIMARY KEY , `u_id` integer NOT NULL , `i_id` integer NOT NULL , `rating` integer DEFAULT NULL , `rank` integer DEFAULT NULL , FOREIG...
SELECT count(*) FROM useracct WHERE u_id NOT IN (SELECT u_id FROM review)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `item` (\n `i_id` integer NOT NULL\n, `title` ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `item` ( `i_id` integer NOT NULL , `title` varchar(20) DEFAULT NULL , PRIMARY KEY (`i_id`) ) CREATE TABLE `review` ( `a_id` integer NOT NULL PRIMARY KEY , `u_id` integer NOT NULL , `i_id` integer NOT NULL , `rating` integer DEFAULT NULL , `rank` integer DEFAULT NULL , FOREIG...
SELECT count(*) FROM item WHERE i_id NOT IN (SELECT i_id FROM review)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player\" (\n\"Player_ID\" int,\n\"Sponsor_name...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "player" ( "Player_ID" int, "Sponsor_name" text, "Player_name" text, "Gender" text, "Residence" text, "Occupation" text, "Votes" int, "Rank" text, PRIMARY KEY ("Player_ID") ) CREATE TABLE "club" ( "Club_ID" int, "Club_name" text, "Region" text, "Start_year" int, PRIMARY KEY ("Club_ID")...
SELECT count(*) FROM player
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player\" (\n\"Player_ID\" int,\n\"Sponsor_name...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "player" ( "Player_ID" int, "Sponsor_name" text, "Player_name" text, "Gender" text, "Residence" text, "Occupation" text, "Votes" int, "Rank" text, PRIMARY KEY ("Player_ID") ) CREATE TABLE "club" ( "Club_ID" int, "Club_name" text, "Region" text, "Start_year" int, PRIMARY KEY ("Club_ID")...
SELECT Player_name FROM player ORDER BY Votes 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 \"player\" (\n\"Player_ID\" int,\n\"Sponsor_name...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "player" ( "Player_ID" int, "Sponsor_name" text, "Player_name" text, "Gender" text, "Residence" text, "Occupation" text, "Votes" int, "Rank" text, PRIMARY KEY ("Player_ID") ) CREATE TABLE "club" ( "Club_ID" int, "Club_name" text, "Region" text, "Start_year" int, PRIMARY KEY ("Club_ID")...
SELECT Gender , Occupation FROM player
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player\" (\n\"Player_ID\" int,\n\"Sponsor_name...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "player" ( "Player_ID" int, "Sponsor_name" text, "Player_name" text, "Gender" text, "Residence" text, "Occupation" text, "Votes" int, "Rank" text, PRIMARY KEY ("Player_ID") ) CREATE TABLE "club" ( "Club_ID" int, "Club_name" text, "Region" text, "Start_year" int, PRIMARY KEY ("Club_ID")...
SELECT Player_name , residence FROM player WHERE Occupation != "Researcher"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player\" (\n\"Player_ID\" int,\n\"Sponsor_name...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "player" ( "Player_ID" int, "Sponsor_name" text, "Player_name" text, "Gender" text, "Residence" text, "Occupation" text, "Votes" int, "Rank" text, PRIMARY KEY ("Player_ID") ) CREATE TABLE "club" ( "Club_ID" int, "Club_name" text, "Region" text, "Start_year" int, PRIMARY KEY ("Club_ID")...
SELECT Sponsor_name FROM player WHERE Residence = "Brandon" OR Residence = "Birtle"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player\" (\n\"Player_ID\" int,\n\"Sponsor_name...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "player" ( "Player_ID" int, "Sponsor_name" text, "Player_name" text, "Gender" text, "Residence" text, "Occupation" text, "Votes" int, "Rank" text, PRIMARY KEY ("Player_ID") ) CREATE TABLE "club" ( "Club_ID" int, "Club_name" text, "Region" text, "Start_year" int, PRIMARY KEY ("Club_ID")...
SELECT Player_name FROM player ORDER BY Votes DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player\" (\n\"Player_ID\" int,\n\"Sponsor_name...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "player" ( "Player_ID" int, "Sponsor_name" text, "Player_name" text, "Gender" text, "Residence" text, "Occupation" text, "Votes" int, "Rank" text, PRIMARY KEY ("Player_ID") ) CREATE TABLE "club" ( "Club_ID" int, "Club_name" text, "Region" text, "Start_year" int, PRIMARY KEY ("Club_ID")...
SELECT Occupation , COUNT(*) FROM player GROUP BY Occupation
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player\" (\n\"Player_ID\" int,\n\"Sponsor_name...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "player" ( "Player_ID" int, "Sponsor_name" text, "Player_name" text, "Gender" text, "Residence" text, "Occupation" text, "Votes" int, "Rank" text, PRIMARY KEY ("Player_ID") ) CREATE TABLE "club" ( "Club_ID" int, "Club_name" text, "Region" text, "Start_year" int, PRIMARY KEY ("Club_ID")...
SELECT Occupation FROM player GROUP BY Occupation 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 \"player\" (\n\"Player_ID\" int,\n\"Sponsor_name...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "player" ( "Player_ID" int, "Sponsor_name" text, "Player_name" text, "Gender" text, "Residence" text, "Occupation" text, "Votes" int, "Rank" text, PRIMARY KEY ("Player_ID") ) CREATE TABLE "club" ( "Club_ID" int, "Club_name" text, "Region" text, "Start_year" int, PRIMARY KEY ("Club_ID")...
SELECT Residence FROM player GROUP BY Residence 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 \"player\" (\n\"Player_ID\" int,\n\"Sponsor_name...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "player" ( "Player_ID" int, "Sponsor_name" text, "Player_name" text, "Gender" text, "Residence" text, "Occupation" text, "Votes" int, "Rank" text, PRIMARY KEY ("Player_ID") ) CREATE TABLE "club" ( "Club_ID" int, "Club_name" text, "Region" text, "Start_year" int, PRIMARY KEY ("Club_ID")...
SELECT T3.Player_name , T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_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 \"player\" (\n\"Player_ID\" int,\n\"Sponsor_name...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "player" ( "Player_ID" int, "Sponsor_name" text, "Player_name" text, "Gender" text, "Residence" text, "Occupation" text, "Votes" int, "Rank" text, PRIMARY KEY ("Player_ID") ) CREATE TABLE "club" ( "Club_ID" int, "Club_name" text, "Region" text, "Start_year" int, PRIMARY KEY ("Club_ID")...
SELECT T3.Player_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T2.Rank = 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 \"player\" (\n\"Player_ID\" int,\n\"Sponsor_name...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "player" ( "Player_ID" int, "Sponsor_name" text, "Player_name" text, "Gender" text, "Residence" text, "Occupation" text, "Votes" int, "Rank" text, PRIMARY KEY ("Player_ID") ) CREATE TABLE "club" ( "Club_ID" int, "Club_name" text, "Region" text, "Start_year" int, PRIMARY KEY ("Club_ID")...
SELECT T3.Player_name , T3.gender FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T1.Starting_year > 2011
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player\" (\n\"Player_ID\" int,\n\"Sponsor_name...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "player" ( "Player_ID" int, "Sponsor_name" text, "Player_name" text, "Gender" text, "Residence" text, "Occupation" text, "Votes" int, "Rank" text, PRIMARY KEY ("Player_ID") ) CREATE TABLE "club" ( "Club_ID" int, "Club_name" text, "Region" text, "Start_year" int, PRIMARY KEY ("Club_ID")...
SELECT T3.Player_name , T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID ORDER BY T3.Votes 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 \"player\" (\n\"Player_ID\" int,\n\"Sponsor_name...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "player" ( "Player_ID" int, "Sponsor_name" text, "Player_name" text, "Gender" text, "Residence" text, "Occupation" text, "Votes" int, "Rank" text, PRIMARY KEY ("Player_ID") ) CREATE TABLE "club" ( "Club_ID" int, "Club_name" text, "Region" text, "Start_year" int, PRIMARY KEY ("Club_ID")...
SELECT Player_name FROM player WHERE Player_ID NOT IN (SELECT Player_ID FROM player_coach)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player\" (\n\"Player_ID\" int,\n\"Sponsor_name...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "player" ( "Player_ID" int, "Sponsor_name" text, "Player_name" text, "Gender" text, "Residence" text, "Occupation" text, "Votes" int, "Rank" text, PRIMARY KEY ("Player_ID") ) CREATE TABLE "club" ( "Club_ID" int, "Club_name" text, "Region" text, "Start_year" int, PRIMARY KEY ("Club_ID")...
SELECT Residence FROM player WHERE gender = "M" INTERSECT SELECT Residence FROM player WHERE gender = "F"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player\" (\n\"Player_ID\" int,\n\"Sponsor_name...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "player" ( "Player_ID" int, "Sponsor_name" text, "Player_name" text, "Gender" text, "Residence" text, "Occupation" text, "Votes" int, "Rank" text, PRIMARY KEY ("Player_ID") ) CREATE TABLE "club" ( "Club_ID" int, "Club_name" text, "Region" text, "Start_year" int, PRIMARY KEY ("Club_ID")...
SELECT T1.club_id , T1.club_name, count(*) FROM club AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T1.club_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 \"player\" (\n\"Player_ID\" int,\n\"Sponsor_name...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "player" ( "Player_ID" int, "Sponsor_name" text, "Player_name" text, "Gender" text, "Residence" text, "Occupation" text, "Votes" int, "Rank" text, PRIMARY KEY ("Player_ID") ) CREATE TABLE "club" ( "Club_ID" int, "Club_name" text, "Region" text, "Start_year" int, PRIMARY KEY ("Club_ID")...
SELECT T1.club_id , T1.gold FROM match_result AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T1.club_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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT count(*) FROM gymnast
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT count(*) FROM gymnast
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT Total_Points FROM gymnast ORDER BY Total_Points 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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT Total_Points FROM gymnast ORDER BY Total_Points 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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points 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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points 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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT avg(Horizontal_Bar_Points) FROM gymnast
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT avg(Horizontal_Bar_Points) FROM gymnast
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT Name FROM People ORDER BY Name 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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT Name FROM People ORDER BY Name 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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown != "Santo Domingo"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown != "Santo Domingo"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT Age FROM people ORDER BY Height 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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT Age FROM people ORDER BY Height 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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT Name FROM People ORDER BY Age DESC LIMIT 5
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT Name FROM People ORDER BY Age DESC LIMIT 5
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT T1.Total_Points FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age 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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT T1.Total_Points FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age 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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT avg(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT avg(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T1.Total_Points > 57.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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T1.Total_Points > 57.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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT T2.Hometown , COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT T2.Hometown , COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown 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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown 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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown 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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown 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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height 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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height 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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT count(DISTINCT Hometown) FROM people
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT count(DISTINCT Hometown) FROM people
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points 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 \"gymnast\" (\n\"Gymnast_ID\" int,\n\"Floor_Exer...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "gymnast" ( "Gymnast_ID" int, "Floor_Exercise_Points" real, "Pommel_Horse_Points" real, "Rings_Points" real, "Vault_Points" real, "Parallel_Bars_Points" real, "Horizontal_Bar_Points" real, "Total_Points" real, PRIMARY KEY ("Gymnast_ID"), FOREIGN KEY ("Gymnast_ID") REFERENCES "people"("P...
SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points 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 ACCOUNTS (\n custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT sum(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name != 'Brown'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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 custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT sum(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name != 'Brown'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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 custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
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 ACCOUNTS (\n custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
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 ACCOUNTS (\n custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT sum(balance) FROM checking
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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 custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT sum(balance) FROM checking
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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 custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT avg(balance) FROM checking
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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 custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT avg(balance) FROM checking
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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 custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT count(*) FROM savings WHERE balance > (SELECT avg(balance) FROM savings)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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 custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT count(*) FROM savings WHERE balance > (SELECT avg(balance) FROM savings)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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 custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT T1.custid , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT max(balance) FROM checking)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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 custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT T1.custid , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT max(balance) FROM checking)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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 custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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 custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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 custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT T2.balance , T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T1.name = 'Brown'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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 custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT T2.balance , T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T1.name = 'Brown'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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 custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT avg(balance) FROM checking) INTERSECT SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT avg(balance) FROM savings)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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 custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT avg(balance) FROM checking) INTERSECT SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT avg(balance) FROM savings)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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 custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT avg(balance) FROM savings))
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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 custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT avg(balance) FROM savings))
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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 custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT name FROM accounts 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 ACCOUNTS (\n custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT name FROM accounts 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 ACCOUNTS (\n custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance 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 custid BIGINT NOT NULL...
You are an expert SQL 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 ( custid BIGINT NOT NULL PRIMARY KEY, name VARCHAR(64) NOT NULL ) CREATE TABLE SAVINGS ( custid BIGINT NOT NULL PRIMARY KEY, balance FLOAT NOT NULL, FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid) ) CREATE TABLE CH...
SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance LIMIT 1