db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
e_learning
select test_result , count(*) from student_tests_taken group by test_result order by count(*) desc
Question: list each test result and its count in descending order of count. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login_name, passwo...
list each test result and its count in descending order of count.
e_learning
select test_result , count(*) from student_tests_taken group by test_result order by count(*) desc
Question: for each distinct test result, find the number of students who got the result. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login...
for each distinct test result, find the number of students who got the result.
e_learning
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'
Question: find the login name of the course author that teaches the course with name 'advanced database'. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_la...
find the login name of the course author that teaches the course with name 'advanced database'.
e_learning
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'
Question: which course author teaches the 'advanced database' course? give me his or her login name. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_...
which course author teaches the 'advanced database' course? give me his or her login name.
e_learning
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'
Question: find the addresses of the course authors who teach the course with name 'operating system' or 'data structure'. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registra...
find the addresses of the course authors who teach the course with name 'operating system' or 'data structure'.
e_learning
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'
Question: what are the addresses of the course authors who teach either 'operating system' or 'data structure' course. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registratio...
what are the addresses of the course authors who teach either 'operating system' or 'data structure' course.
e_learning
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
Question: find the personal name, family name, and author id of the course author that teaches the most courses. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, dat...
find the personal name, family name, and author id of the course author that teaches the most courses.
e_learning
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
Question: what are the personal name, family name, and author id of the course author who teaches the most courses? | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, ...
what are the personal name, family name, and author id of the course author who teaches the most courses?
e_learning
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
Question: find the addresses and author ids of the course authors that teach at least two courses. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_lo...
find the addresses and author ids of the course authors that teach at least two courses.
e_learning
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
Question: which course authors teach two or more courses? give me their addresses and author ids. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_log...
which course authors teach two or more courses? give me their addresses and author ids.
e_learning
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'
Question: find the names of courses taught by the tutor who has personal name 'julio'. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login_n...
find the names of courses taught by the tutor who has personal name 'julio'.
e_learning
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'
Question: what are the names of the courses taught by the tutor whose personal name is 'julio'? | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon...
what are the names of the courses taught by the tutor whose personal name is 'julio'?
e_learning
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'
Question: find the names and descriptions of courses that belong to the subject named 'computer science'. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_la...
find the names and descriptions of courses that belong to the subject named 'computer science'.
e_learning
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'
Question: what are the names and descriptions of the all courses under the 'computer science' subject? | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_lates...
what are the names and descriptions of the all courses under the 'computer science' subject?
e_learning
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
Question: find the subject id, subject name, and the corresponding number of available courses for each subject. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, dat...
find the subject id, subject name, and the corresponding number of available courses for each subject.
e_learning
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
Question: what are the subject id, subject name, and the number of available courses for each subject? | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_lates...
what are the subject id, subject name, and the number of available courses for each subject?
e_learning
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
Question: find the subject id, name of subject and the corresponding number of courses for each subject, and sort by the course count in ascending order. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students...
find the subject id, name of subject and the corresponding number of courses for each subject, and sort by the course count in ascending order.
e_learning
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
Question: list the subject id, name of subject and the number of courses available for each subject in ascending order of the course counts. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_i...
list the subject id, name of subject and the number of courses available for each subject in ascending order of the course counts.
e_learning
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'
Question: what is the date of enrollment of the course named 'spanish'? | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login_name, password, ...
what is the date of enrollment of the course named 'spanish'?
e_learning
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'
Question: find the the date of enrollment of the 'spanish' course. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login_name, password, perso...
find the the date of enrollment of the 'spanish' course.
e_learning
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
Question: what is the name of the course that has the most student enrollment? | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login_name, pas...
what is the name of the course that has the most student enrollment?
e_learning
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
Question: which course is enrolled in by the most students? give me the course name. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login_nam...
which course is enrolled in by the most students? give me the course name.
e_learning
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
Question: what are the names of the courses that have exactly 1 student enrollment? | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login_name...
what are the names of the courses that have exactly 1 student enrollment?
e_learning
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
Question: find the names of the courses that have just one student enrollment. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login_name, pas...
find the names of the courses that have just one student enrollment.
e_learning
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
Question: what are the descriptions and names of the courses that have student enrollment bigger than 2? | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_lat...
what are the descriptions and names of the courses that have student enrollment bigger than 2?
e_learning
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
Question: return the descriptions and names of the courses that have more than two students enrolled in. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_lat...
return the descriptions and names of the courses that have more than two students enrolled in.
e_learning
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
Question: what is the name of each course and the corresponding number of student enrollment? | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, ...
what is the name of each course and the corresponding number of student enrollment?
e_learning
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
Question: list the name and the number of enrolled student for each course. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login_name, passwo...
list the name and the number of enrolled student for each course.
e_learning
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'
Question: what are the enrollment dates of all the tests that have result 'pass'? | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login_name, ...
what are the enrollment dates of all the tests that have result 'pass'?
e_learning
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'
Question: find the enrollment date for all the tests that have 'pass' result. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login_name, pass...
find the enrollment date for all the tests that have 'pass' result.
e_learning
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'
Question: what are the completion dates of all the tests that have result 'fail'? | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login_name, ...
what are the completion dates of all the tests that have result 'fail'?
e_learning
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'
Question: return the completion date for all the tests that have 'fail' result. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login_name, pa...
return the completion date for all the tests that have 'fail' result.
e_learning
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'
Question: list the dates of enrollment and completion of the student with personal name 'karson'. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_log...
list the dates of enrollment and completion of the student with personal name 'karson'.
e_learning
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'
Question: on what dates did the student whose personal name is 'karson' enroll in and complete the courses? | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_...
on what dates did the student whose personal name is 'karson' enroll in and complete the courses?
e_learning
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'
Question: list the dates of enrollment and completion of the student with family name 'zieme' and personal name 'bernie'. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registra...
list the dates of enrollment and completion of the student with family name 'zieme' and personal name 'bernie'.
e_learning
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'
Question: on what dates did the student with family name 'zieme' and personal name 'bernie' enroll in and complete the courses? | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_re...
on what dates did the student with family name 'zieme' and personal name 'bernie' enroll in and complete the courses?
e_learning
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
Question: find the student id and login name of the student with the most course enrollments | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, l...
find the student id and login name of the student with the most course enrollments
e_learning
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
Question: what are the student id and login name of the student who are enrolled in the most courses? | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest...
what are the student id and login name of the student who are enrolled in the most courses?
e_learning
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
Question: find the student id and personal name of the student with at least two enrollments. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, ...
find the student id and personal name of the student with at least two enrollments.
e_learning
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
Question: which student are enrolled in at least two courses? give me the student id and personal name. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_late...
which student are enrolled in at least two courses? give me the student id and personal name.
e_learning
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
Question: find the student id and middle name for all the students with at most two enrollments. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logo...
find the student id and middle name for all the students with at most two enrollments.
e_learning
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
Question: what are the student ids and middle names of the students enrolled in at most two courses? | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_...
what are the student ids and middle names of the students enrolled in at most two courses?
e_learning
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
Question: find the personal names of students not enrolled in any course. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login_name, password...
find the personal names of students not enrolled in any course.
e_learning
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
Question: which students not enrolled in any course? find their personal names. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login_name, pa...
which students not enrolled in any course? find their personal names.
e_learning
select count(*) from students where student_id not in (select student_id from student_course_enrolment)
Question: how many students did not have any course enrollment? | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login_name, password, personal...
how many students did not have any course enrollment?
e_learning
select count(*) from students where student_id not in (select student_id from student_course_enrolment)
Question: count the number of students who did not enroll in any course. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login_name, password,...
count the number of students who did not enroll in any course.
e_learning
select login_name from course_authors_and_tutors intersect select login_name from students
Question: find the common login name of course authors and students. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login_name, password, per...
find the common login name of course authors and students.
e_learning
select login_name from course_authors_and_tutors intersect select login_name from students
Question: what are the login names used both by some course authors and some students? | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login_n...
what are the login names used both by some course authors and some students?
e_learning
select personal_name from course_authors_and_tutors intersect select personal_name from students
Question: find the common personal name of course authors and students. | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, login_name, password, ...
find the common personal name of course authors and students.
e_learning
select personal_name from course_authors_and_tutors intersect select personal_name from students
Question: what are the personal names used both by some course authors and some students? | Tables: Course_Authors_and_Tutors -> author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. Students -> student_id, date_of_registration, date_of_latest_logon, logi...
what are the personal names used both by some course authors and some students?
insurance_policies
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...
Question: which claims caused more than 2 settlements or have the maximum claim value? list the date the claim was made and the claim id. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_M...
which claims caused more than 2 settlements or have the maximum claim value? list the date the claim was made and the claim id.
insurance_policies
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...
Question: find the claims that led to more than two settlements or have the maximum claim value. for each of them, return the date the claim was made and the id of the claim. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims...
find the claims that led to more than two settlements or have the maximum claim value. for each of them, return the date the claim was made and the id of the claim.
insurance_policies
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...
Question: which customer had at least 2 policies but did not file any claims? list the customer details and id. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, A...
which customer had at least 2 policies but did not file any claims? list the customer details and id.
insurance_policies
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...
Question: give me the the customer details and id for the customers who had two or more policies but did not file any claims. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Cl...
give me the the customer details and id for the customers who had two or more policies but did not file any claims.
insurance_policies
select payment_method_code , date_payment_made , amount_payment from payments order by date_payment_made asc
Question: list the method, date and amount of all the payments, in ascending order of date. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amoun...
list the method, date and amount of all the payments, in ascending order of date.
insurance_policies
select payment_method_code , date_payment_made , amount_payment from payments order by date_payment_made asc
Question: what are the method, date and amount of each payment? sort the list in ascending order of date. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_...
what are the method, date and amount of each payment? sort the list in ascending order of date.
insurance_policies
select amount_settled , amount_claimed from claims order by amount_claimed desc limit 1
Question: among all the claims, what is the settlement amount of the claim with the largest claim amount? list both the settlement amount and claim amount. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Polic...
among all the claims, what is the settlement amount of the claim with the largest claim amount? list both the settlement amount and claim amount.
insurance_policies
select amount_settled , amount_claimed from claims order by amount_claimed desc limit 1
Question: find the settlement amount of the claim with the largest claim amount. show both the settlement amount and claim amount. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Da...
find the settlement amount of the claim with the largest claim amount. show both the settlement amount and claim amount.
insurance_policies
select amount_settled , amount_claimed from claims order by amount_settled asc limit 1
Question: among all the claims, what is the amount claimed in the claim with the least amount settled? list both the settlement amount and claim amount. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_I...
among all the claims, what is the amount claimed in the claim with the least amount settled? list both the settlement amount and claim amount.
insurance_policies
select amount_settled , amount_claimed from claims order by amount_settled asc limit 1
Question: find the claimed amount in the claim with the least amount settled. show both the settlement amount and claim amount. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_...
find the claimed amount in the claim with the least amount settled. show both the settlement amount and claim amount.
insurance_policies
select date_claim_made , date_claim_settled from claims where amount_claimed > ( select avg(amount_claimed) from claims )
Question: among all the claims, which claims have a claimed amount larger than the average? list the date the claim was made and the date it was settled. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_...
among all the claims, which claims have a claimed amount larger than the average? list the date the claim was made and the date it was settled.
insurance_policies
select date_claim_made , date_claim_settled from claims where amount_claimed > ( select avg(amount_claimed) from claims )
Question: give me the claim date, settlement date for all the claims whose claimed amount is larger than the average. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Sett...
give me the claim date, settlement date for all the claims whose claimed amount is larger than the average.
insurance_policies
select date_claim_made from claims where amount_settled <= ( select avg(amount_settled) from claims )
Question: among all the claims, which settlements have a claimed amount that is no more than the average? list the claim start date. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, ...
among all the claims, which settlements have a claimed amount that is no more than the average? list the claim start date.
insurance_policies
select date_claim_made from claims where amount_settled <= ( select avg(amount_settled) from claims )
Question: return the claim start date for the claims whose claimed amount is no more than the average | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Clai...
return the claim start date for the claims whose claimed amount is no more than the average
insurance_policies
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
Question: how many settlements does each claim correspond to? list the claim id and the number of settlements. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Am...
how many settlements does each claim correspond to? list the claim id and the number of settlements.
insurance_policies
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
Question: find the number of settlements each claim corresponds to. show the number together with the claim id. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, A...
find the number of settlements each claim corresponds to. show the number together with the claim id.
insurance_policies
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
Question: which claim incurred the most number of settlements? list the claim id, the date the claim was made, and the number. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_C...
which claim incurred the most number of settlements? list the claim id, the date the claim was made, and the number.
insurance_policies
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
Question: find the claim id and claim date of the claim that incurred the most settlement count. also tell me the count. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_S...
find the claim id and claim date of the claim that incurred the most settlement count. also tell me the count.
insurance_policies
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
Question: how many settlements were made on the claim with the most recent claim settlement date? list the number and the claim id. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, D...
how many settlements were made on the claim with the most recent claim settlement date? list the number and the claim id.
insurance_policies
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
Question: find the claim id and the number of settlements made for the claim with the most recent settlement date. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled...
find the claim id and the number of settlements made for the claim with the most recent settlement date.
insurance_policies
select date_claim_made from claims order by date_claim_made asc limit 1
Question: of all the claims, what was the earliest date when any claim was made? | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled. ...
of all the claims, what was the earliest date when any claim was made?
insurance_policies
select date_claim_made from claims order by date_claim_made asc limit 1
Question: tell me the the date when the first claim was made. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled. Settlements -> Sett...
tell me the the date when the first claim was made.
insurance_policies
select sum(amount_settled) from settlements
Question: what is the total amount of settlement made for all the settlements? | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled. Se...
what is the total amount of settlement made for all the settlements?
insurance_policies
select sum(amount_settled) from settlements
Question: compute the total amount of settlement across all the settlements. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled. Sett...
compute the total amount of settlement across all the settlements.
insurance_policies
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
Question: who are the customers that had more than 1 policy? list the customer details and id. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Am...
who are the customers that had more than 1 policy? list the customer details and id.
insurance_policies
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
Question: find the the customer details and id for the customers who had more than one policy. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Am...
find the the customer details and id for the customers who had more than one policy.
insurance_policies
select date_claim_made , date_claim_settled from settlements
Question: what are the claim dates and settlement dates of all the settlements? | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled. S...
what are the claim dates and settlement dates of all the settlements?
insurance_policies
select date_claim_made , date_claim_settled from settlements
Question: tell me the the claim date and settlement date for each settlement case. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled...
tell me the the claim date and settlement date for each settlement case.
insurance_policies
select payment_method_code from payments group by payment_method_code order by count(*) desc limit 1
Question: what is the most popular payment method? | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled. Settlements -> Settlement_ID, ...
what is the most popular payment method?
insurance_policies
select payment_method_code from payments group by payment_method_code order by count(*) desc limit 1
Question: which payment method is used the most often? | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled. Settlements -> Settlement_...
which payment method is used the most often?
insurance_policies
select payment_method_code from payments group by payment_method_code order by count(*) asc limit 1
Question: with which kind of payment method were the least number of payments processed? | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_S...
with which kind of payment method were the least number of payments processed?
insurance_policies
select payment_method_code from payments group by payment_method_code order by count(*) asc limit 1
Question: what is the payment method that were used the least often? | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled. Settlements ...
what is the payment method that were used the least often?
insurance_policies
select sum(amount_payment) from payments
Question: what is the total amount of payment? | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled. Settlements -> Settlement_ID, Clai...
what is the total amount of payment?
insurance_policies
select sum(amount_payment) from payments
Question: compute the total amount of payment processed. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled. Settlements -> Settlemen...
compute the total amount of payment processed.
insurance_policies
select distinct customer_details from customers
Question: what are all the distinct details of the customers? | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled. Settlements -> Sett...
what are all the distinct details of the customers?
insurance_policies
select distinct customer_details from customers
Question: return the distinct customer details. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled. Settlements -> Settlement_ID, Cla...
return the distinct customer details.
insurance_policies
select policy_type_code from customer_policies group by policy_type_code order by count(*) desc limit 1
Question: which kind of policy type was chosen by the most customers? | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled. Settlements...
which kind of policy type was chosen by the most customers?
insurance_policies
select policy_type_code from customer_policies group by policy_type_code order by count(*) desc limit 1
Question: find the policy type the most customers choose. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled. Settlements -> Settleme...
find the policy type the most customers choose.
insurance_policies
select count(*) from settlements
Question: how many settlements are there in total? | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled. Settlements -> Settlement_ID, ...
how many settlements are there in total?
insurance_policies
select count(*) from settlements
Question: count the total number of settlements made. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled. Settlements -> Settlement_I...
count the total number of settlements made.
insurance_policies
select payment_id , date_payment_made , amount_payment from payments where payment_method_code = 'visa'
Question: which payments were processed with visa? list the payment id, the date and the amount. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, ...
which payments were processed with visa? list the payment id, the date and the amount.
insurance_policies
select payment_id , date_payment_made , amount_payment from payments where payment_method_code = 'visa'
Question: give me the payment id, the date and the amount for all the payments processed with visa. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claime...
give me the payment id, the date and the amount for all the payments processed with visa.
insurance_policies
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
Question: list the details of the customers who do not have any policies. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled. Settlem...
list the details of the customers who do not have any policies.
insurance_policies
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
Question: which customers do not have any policies? find the details of these customers. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_S...
which customers do not have any policies? find the details of these customers.
insurance_policies
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
Question: list the date the claim was made, the date it was settled and the amount settled for all the claims which had exactly one settlement. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_C...
list the date the claim was made, the date it was settled and the amount settled for all the claims which had exactly one settlement.
insurance_policies
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
Question: which claims had exactly one settlement? for each, tell me the the date the claim was made, the date it was settled and the amount settled. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, ...
which claims had exactly one settlement? for each, tell me the the date the claim was made, the date it was settled and the amount settled.
insurance_policies
select sum(amount_claimed) from claims
Question: find the total claimed amount of all the claims. | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled. Settlements -> Settlem...
find the total claimed amount of all the claims.
insurance_policies
select sum(amount_claimed) from claims
Question: what is total amount claimed summed across all the claims? | Tables: Customers -> Customer_ID, Customer_Details. Customer_Policies -> Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date. Claims -> Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled. Settlements ...
what is total amount claimed summed across all the claims?
hospital_1
select name from department group by departmentid order by count(departmentid) desc limit 1;
Question: which department has the largest number of employees? | Tables: Physician -> EmployeeID, Name, Position, SSN. Department -> DepartmentID, Name, Head. Affiliated_With -> Physician, Department, PrimaryAffiliation. Procedures -> Code, Name, Cost. Trained_In -> Physician, Treatment, CertificationDate, Certificati...
which department has the largest number of employees?
hospital_1
select name from department group by departmentid order by count(departmentid) desc limit 1;
Question: find the department with the most employees. | Tables: Physician -> EmployeeID, Name, Position, SSN. Department -> DepartmentID, Name, Head. Affiliated_With -> Physician, Department, PrimaryAffiliation. Procedures -> Code, Name, Cost. Trained_In -> Physician, Treatment, CertificationDate, CertificationExpires...
find the department with the most employees.