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 `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT test_result , COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) 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 `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT test_result , COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) 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 `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = "advanced database"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = "advanced database"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = "operating system" OR T2.course_name = "data structure"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = "operating system" OR T2.course_name = "data structure"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.personal_name , T1.family_name , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_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 `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.personal_name , T1.family_name , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_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 `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.address_line_1 , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id HAVING Count(*) >= 2
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.address_line_1 , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id HAVING Count(*) >= 2
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = "Julio"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = "Julio"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.course_name , T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = "Computer Science"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.course_name , T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = "Computer Science"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_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 `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_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 `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_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 `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_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 `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "Spanish"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "Spanish"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.course_description , T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name 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 `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.course_description , T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name 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 `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.course_name , COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_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 `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.course_name , COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_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 `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = "Karson"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = "Karson"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.family_name = "Zieme" AND T2.personal_name = "Bernie"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.family_name = "Zieme" AND T2.personal_name = "Bernie"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.student_id , T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_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 `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.student_id , T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_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 `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.student_id , T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) >= 2
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.student_id , T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) >= 2
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.student_id , T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) <= 2
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT T1.student_id , T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) <= 2
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_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 `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_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 `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT count(*) FROM Students WHERE student_id NOT IN (SELECT student_id FROM Student_Course_Enrolment)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT count(*) FROM Students WHERE student_id NOT IN (SELECT student_id FROM Student_Course_Enrolment)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Course_Authors_and_Tutors` (\n`author_id` INTEG...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Course_Authors_and_Tutors` ( `author_id` INTEGER PRIMARY KEY, `author_tutor_ATB` VARCHAR(3), `login_name` VARCHAR(40), `password` VARCHAR(40), `personal_name` VARCHAR(80), `middle_name` VARCHAR(80), `family_name` VARCHAR(80), `gender_mf` VARCHAR(1), `address_line_1` VARCHAR(80) ) CREA...
SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id HAVING count(*) > 2 UNION SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id WHERE T1.Amount_Claimed = ( SELECT max(Amou...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id HAVING count(*) > 2 UNION SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id WHERE T1.Amount_Claimed = ( SELECT max(Amou...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2 EXCEPT SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id JO...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2 EXCEPT SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id JO...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Payment_Method_Code , Date_Payment_Made , Amount_Payment FROM Payments ORDER BY Date_Payment_Made 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 Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Payment_Method_Code , Date_Payment_Made , Amount_Payment FROM Payments ORDER BY Date_Payment_Made 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 Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Claimed 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 Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Claimed 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 Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Settled 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 Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Settled 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 Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Date_Claim_Made , Date_Claim_Settled FROM Claims WHERE Amount_Claimed > ( SELECT avg(Amount_Claimed) FROM Claims )
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Date_Claim_Made , Date_Claim_Settled FROM Claims WHERE Amount_Claimed > ( SELECT avg(Amount_Claimed) FROM Claims )
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled <= ( SELECT avg(Amount_Settled) FROM Claims )
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled <= ( SELECT avg(Amount_Settled) FROM Claims )
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT T1.Claim_id , count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_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 Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT T1.Claim_id , count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_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 Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT T1.claim_id , T1.date_claim_made , count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_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 Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT T1.claim_id , T1.date_claim_made , count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_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 Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT count(*) , T1.claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY T1.Date_Claim_Settled 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 Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT count(*) , T1.claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY T1.Date_Claim_Settled 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 Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made 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 Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made 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 Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT sum(Amount_Settled) FROM Settlements
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT sum(Amount_Settled) FROM Settlements
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.Customer_id GROUP BY T1.customer_id HAVING count(*) > 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.Customer_id GROUP BY T1.customer_id HAVING count(*) > 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Date_Claim_Made , Date_Claim_Settled FROM Settlements
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Date_Claim_Made , Date_Claim_Settled FROM Settlements
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_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 Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_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 Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) ASC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) ASC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT sum(Amount_Payment) FROM Payments
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT sum(Amount_Payment) FROM Payments
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT DISTINCT customer_details FROM Customers
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT DISTINCT customer_details FROM Customers
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT count(*) FROM Settlements
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT count(*) FROM Settlements
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Payment_ID , Date_Payment_Made , Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT Payment_ID , Date_Payment_Made , Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT customer_details FROM Customers EXCEPT SELECT T1.customer_details FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id = T2.customer_id
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT customer_details FROM Customers EXCEPT SELECT T1.customer_details FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id = T2.customer_id
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT T1.claim_id , T1.date_claim_made , T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.claim_id HAVING count(*) = 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT T1.claim_id , T1.date_claim_made , T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.claim_id HAVING count(*) = 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT sum(Amount_Claimed) FROM Claims
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Customers (\nCustomer_ID INTEGER NOT NULL,\nCust...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Customers ( Customer_ID INTEGER NOT NULL, Customer_Details VARCHAR(255) NOT NULL, PRIMARY KEY (Customer_ID) ) CREATE TABLE Customer_Policies ( Policy_ID INTEGER NOT NULL, Customer_ID INTEGER NOT NULL, Policy_Type_Code CHAR(15) NOT NULL, Start_Date DATE, End_Date DATE, PRIMARY KEY (Poli...
SELECT sum(Amount_Claimed) FROM Claims
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Physician (\n EmployeeID INTEGER NOT NULL,\n N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Physician ( EmployeeID INTEGER NOT NULL, Name VARCHAR(30) NOT NULL, Position VARCHAR(30) NOT NULL, SSN INTEGER NOT NULL, CONSTRAINT pk_physician PRIMARY KEY(EmployeeID) ) CREATE TABLE Department ( DepartmentID INTEGER NOT NULL, Name VARCHAR(30) NOT NULL, Head INTEGER NO...
SELECT name FROM department GROUP BY departmentID ORDER BY count(departmentID) 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 Physician (\n EmployeeID INTEGER NOT NULL,\n N...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Physician ( EmployeeID INTEGER NOT NULL, Name VARCHAR(30) NOT NULL, Position VARCHAR(30) NOT NULL, SSN INTEGER NOT NULL, CONSTRAINT pk_physician PRIMARY KEY(EmployeeID) ) CREATE TABLE Department ( DepartmentID INTEGER NOT NULL, Name VARCHAR(30) NOT NULL, Head INTEGER NO...
SELECT name FROM department GROUP BY departmentID ORDER BY count(departmentID) DESC LIMIT 1;