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 Student (\n StuID INTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE ...
SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" AND t3.age > 18
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE ...
SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" AND t3.age > 18
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE ...
SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" AND t3.age < 18
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE ...
SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" AND t3.age < 18
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE ...
SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = "BAL"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE ...
SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = "BAL"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE ...
SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = "HOU"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE ...
SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = "HOU"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE ...
SELECT count(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = "Eric" AND t3.lname = "Tai"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE ...
SELECT count(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = "Eric" AND t3.lname = "Tai"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE ...
SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = "Davis" AND t3.lname = "Steven"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE ...
SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = "Davis" AND t3.lname = "Steven"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE ...
SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.advisor = 1121
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE ...
SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.advisor = 1121
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE ...
SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE ...
SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE ...
SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Hopkins Student Enterprises"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE ...
SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Hopkins Student Enterprises"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE ...
SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Tennis Club"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE ...
SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Tennis Club"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT sum(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT sum(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT date_from , date_to FROM Project_Staff WHERE project_id IN( SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY count(*) DESC LIMIT 1 ) UNION SELECT date_from , date_to FROM Project_Staff WHERE role_code = 'leader'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT date_from , date_to FROM Project_Staff WHERE project_id IN( SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY count(*) DESC LIMIT 1 ) UNION SELECT date_from , date_to FROM Project_Staff WHERE role_code = 'leader'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T2.organisation_id , T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING sum(T1.grant_amount) > 6000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T2.organisation_id , T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING sum(T1.grant_amount) > 6000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.organisation_type , T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.organisation_type , T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id = T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type = T4.organisation_type WHERE T2.grant_amount > 5000 AND T4.organisation_type_description = 'Research...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id = T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type = T4.organisation_type WHERE T2.grant_amount > 5000 AND T4.organisation_type_description = 'Research...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_Staff WHERE role_code = '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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_Staff WHERE role_code = '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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.task_details , T1.task_id , T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details , T1.task_id , T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS ...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.task_details , T1.task_id , T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details , T1.task_id , T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS ...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT date_from , date_to FROM Project_Staff WHERE role_code = '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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT date_from , date_to FROM Project_Staff WHERE role_code = '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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT count(DISTINCT role_code) FROM Project_Staff
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT count(DISTINCT role_code) FROM Project_Staff
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT sum(grant_amount) , organisation_id FROM Grants GROUP BY organisation_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT sum(grant_amount) , organisation_id FROM Grants GROUP BY organisation_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.project_id , count(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count(*) 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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.project_id , count(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count(*) 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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT role_description FROM Staff_Roles WHERE role_code = '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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT role_description FROM Staff_Roles WHERE role_code = '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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT date_from FROM Project_Staff ORDER BY date_from 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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT date_from FROM Project_Staff ORDER BY date_from 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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.project_details , T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.project_details , T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_outcomes )
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_outcomes )
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.organisation_id , T1.organisation_type , T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.organisation_id , T1.organisation_type , T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.role_description , T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.role_description , T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.gran...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.gran...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT grant_id , count(*) FROM Documents GROUP BY grant_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT grant_id , count(*) FROM Documents GROUP BY grant_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_details = 'quo'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_details = 'quo'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT count(*) FROM Project_outcomes WHERE outcome_code = 'Patent'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT count(*) FROM Project_outcomes WHERE outcome_code = 'Patent'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT count(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT count(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT date_to FROM Project_Staff ORDER BY date_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT date_to FROM Project_Staff ORDER BY date_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code JOIN Projects AS T3 ON T2.project_id = T3.project_id WHERE T3.project_details = 'sint'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code JOIN Projects AS T3 ON T2.project_id = T3.project_id WHERE T3.project_details = 'sint'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.organisation_id , count(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.organisation_id , count(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT staff_details FROM Research_Staff ORDER BY staff_details 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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT staff_details FROM Research_Staff ORDER BY staff_details 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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT count(*) FROM Tasks
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT count(*) FROM Tasks
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT count(*) , T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT count(*) , T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_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 `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Document_Types` (\n`document_type_code` VARCHAR...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Document_Types` ( `document_type_code` VARCHAR(10) PRIMARY KEY, `document_description` VARCHAR(255) NOT NULL ) CREATE TABLE `Documents` ( `document_id` INTEGER PRIMARY KEY, `document_type_code` VARCHAR(10), `grant_id` INTEGER NOT NULL, `sent_date` DATETIME NOT NULL, `response_received...
SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Person (\n name varchar(20) PRIMARY KEY,\n age...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Person ( name varchar(20) PRIMARY KEY, age INTEGER, city TEXT, gender TEXT, job TEXT ) CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER, FOREIGN KEY (name) REFERENCES Person(name), FOREIGN KEY (friend) REFERENCES Person(name) ) ### Que...
SELECT count(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Person (\n name varchar(20) PRIMARY KEY,\n age...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Person ( name varchar(20) PRIMARY KEY, age INTEGER, city TEXT, gender TEXT, job TEXT ) CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER, FOREIGN KEY (name) REFERENCES Person(name), FOREIGN KEY (friend) REFERENCES Person(name) ) ### Que...
SELECT count(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan'