db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
cs_semester
select t3.name from student as t1 inner join registration as t2 on t1.student_id = t2.student_id inner join course as t3 on t2.course_id = t3.course_id where t2.sat = 1 and t1.intelligence = 1
Question: what are the names of the courses that the students with the lowest intelligence are least satisfied with? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. regist...
what are the names of the courses that the students with the lowest intelligence are least satisfied with?
cs_semester
select t2.name from registration as t1 inner join course as t2 on t1.course_id = t2.course_id where t1.grade = 'a' and t2.name in ('advanced operating system', 'intro to blockchain') group by t2.name order by count(t1.student_id) desc limit 1
Question: which of the two courses, 'advanced operating system' or 'intro to blockchain', did most of the students receive an a in? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id,...
which of the two courses, 'advanced operating system' or 'intro to blockchain', did most of the students receive an a in?
cs_semester
select t2.popularity from ra as t1 inner join prof as t2 on t1.prof_id = t2.prof_id group by t1.prof_id, t1.capability order by count(t1.student_id) desc, t1.capability desc limit 1
Question: what is the popularity of the professor who advises the highest number of students with the highest research ability? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, sal...
what is the popularity of the professor who advises the highest number of students with the highest research ability?
cs_semester
select cast(count(t1.student_id) as real) / count(distinct t2.course_id) from registration as t1 inner join course as t2 on t1.course_id = t2.course_id where t2.diff = 4
Question: what is the average number of students who registered for the courses with a difficulty of 4? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> cou...
what is the average number of students who registered for the courses with a difficulty of 4?
cs_semester
select count(t2.student_id) from student as t1 inner join registration as t2 on t1.student_id = t2.student_id where t2.grade is null and t1.gpa between 3 and 4
Question: how many students, who have a gpa between 3 to 4, failed a course? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, ...
how many students, who have a gpa between 3 to 4, failed a course?
cs_semester
select count(t2.student_id) from student as t1 inner join registration as t2 on t1.student_id = t2.student_id where t2.grade = 'a' and t1.type = 'ug'
Question: how many students taking a bachelor's degree received an a in all of the courses that they took? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> ...
how many students taking a bachelor's degree received an a in all of the courses that they took?
cs_semester
select avg(t2.gpa), t2.f_name, t2.l_name from ra as t1 inner join student as t2 on t1.student_id = t2.student_id where t1.salary = 'high' and t1.capability = 5 group by t2.student_id
Question: what is the average gpa of the students with the highest research capability and high salary? list the full names of the students. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability,...
what is the average gpa of the students with the highest research capability and high salary? list the full names of the students.
cs_semester
select prof_id, student_id from ra where capability = ( select min(capability) from ra )
Question: list the professors' ids and students' ids with the lowest research ability. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_i...
list the professors' ids and students' ids with the lowest research ability.
cs_semester
select first_name, last_name from prof where graduate_from = 'university of boston'
Question: name the professor who got graduation from the university of boston. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade...
name the professor who got graduation from the university of boston.
cs_semester
select course_id, student_id from registration where grade is null or grade = ''
Question: list the courses' ids and students' ids who failed to pass the course. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, gra...
list the courses' ids and students' ids who failed to pass the course.
cs_semester
select cast(sum(case when gender = 'male' then 1 else 0 end) as real) / sum(case when gender = 'female' then 1 else 0 end) from prof
Question: what is the male and female ratio among the professors? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. studen...
what is the male and female ratio among the professors?
cs_semester
select name, credit from course where diff = ( select min(diff) from course )
Question: describe the names and credits of the least difficult courses. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat....
describe the names and credits of the least difficult courses.
cs_semester
select t3.f_name, t3.l_name, t3.gpa from prof as t1 inner join ra as t2 on t1.prof_id = t2.prof_id inner join student as t3 on t2.student_id = t3.student_id order by t1.popularity desc limit 1
Question: describe the students' full names and gpas under the supervision of the most popular professor. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> c...
describe the students' full names and gpas under the supervision of the most popular professor.
cs_semester
select t2.f_name, t2.l_name, t2.email from ra as t1 inner join student as t2 on t1.student_id = t2.student_id where t1.salary = 'free'
Question: provide the full names and emails of unpaid research assistants. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sa...
provide the full names and emails of unpaid research assistants.
cs_semester
select t3.f_name, t3.l_name, t2.capability, t3.gpa from prof as t1 inner join ra as t2 on t1.prof_id = t2.prof_id inner join student as t3 on t2.student_id = t3.student_id where t1.first_name = 'merwyn' and t1.last_name = 'conkay'
Question: list the research assistants' full names, capabilities and gpas who were under the supervision of merwyn conkay. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. ...
list the research assistants' full names, capabilities and gpas who were under the supervision of merwyn conkay.
cs_semester
select t1.f_name, t1.l_name, t2.grade from student as t1 inner join registration as t2 on t1.student_id = t2.student_id inner join course as t3 on t2.course_id = t3.course_id where t3.name = 'intro to blockchain'
Question: describe the students' full names and grades in intro to blockchain course. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id...
describe the students' full names and grades in intro to blockchain course.
cs_semester
select t1.f_name, t1.l_name from student as t1 inner join registration as t2 on t1.student_id = t2.student_id inner join course as t3 on t2.course_id = t3.course_id where t2.grade = 'a' order by t3.diff desc limit 1
Question: among students registered for the most difficult course, list the students' full names who got grade a. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registrat...
among students registered for the most difficult course, list the students' full names who got grade a.
cs_semester
select t1.first_name, t1.last_name, t1.graduate_from from prof as t1 inner join ra as t2 on t1.prof_id = t2.prof_id inner join student as t3 on t2.student_id = t3.student_id where t3.f_name = 'olia' and t3.l_name = 'rabier'
Question: describe the full names and graduated universities of the professors who advised olia rabier. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> cou...
describe the full names and graduated universities of the professors who advised olia rabier.
cs_semester
select t1.f_name, t1.l_name from student as t1 inner join registration as t2 on t1.student_id = t2.student_id inner join course as t3 on t2.course_id = t3.course_id where t3.name = 'advanced database systems' order by t2.sat desc limit 1
Question: name the students of the advanced database systems course with the highest satisfaction. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_i...
name the students of the advanced database systems course with the highest satisfaction.
cs_semester
select cast(sum(t3.credit * case t1.grade when 'a' then 4 when 'b' then 3 when 'c' then 2 when 'd' then 1 else 1 end) as real) / count(t3.credit) from registration as t1 inner join student as t2 on t1.student_id = t2.student_id inner join course as t3 on t1.course_id = t3.course_id where t2.f_name = 'laughton' and t2.l...
Question: calculate the gpa of the semester for laughton antonio. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. studen...
calculate the gpa of the semester for laughton antonio.
cs_semester
select distinct t1.f_name from student as t1 inner join registration as t2 on t1.student_id = t2.student_id inner join course as t3 on t2.course_id = t3.course_id where t1.type = 'ug' and t1.gpa > 3.7
Question: provide the registered courses' names by undergraduate students with gpa of 3.7 and above. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course...
provide the registered courses' names by undergraduate students with gpa of 3.7 and above.
cs_semester
select t3.f_name, t3.l_name, t2.capability from prof as t1 inner join ra as t2 on t1.prof_id = t2.prof_id inner join student as t3 on t2.student_id = t3.student_id where t1.graduate_from = 'university of washington'
Question: describe the names and capability of the students who were advised by professors from the university of washington. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salar...
describe the names and capability of the students who were advised by professors from the university of washington.
cs_semester
select f_name, l_name, email, intelligence from student where student_id in ( select student_id from ra where salary = 'high' and capability = ( select max(capability) from ra ) )
Question: describe the full names, emails and intelligence of the students with the highest capability and salary. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registra...
describe the full names, emails and intelligence of the students with the highest capability and salary.
cs_semester
select t5.name, t5.credit from ra as t1 inner join prof as t2 on t1.prof_id = t2.prof_id inner join student as t3 on t1.student_id = t3.student_id inner join registration as t4 on t3.student_id = t4.student_id inner join course as t5 on t4.course_id = t5.course_id where t2.gender = 'female' order by t2.teachingability ...
Question: mention the names and credits of course registered by the students who were under the supervision of female professor with the highest teaching ability. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> s...
mention the names and credits of course registered by the students who were under the supervision of female professor with the highest teaching ability.
cs_semester
select count(prof_id) from prof where gender = 'female'
Question: how many of the professors are female? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. student -> student_id, ...
how many of the professors are female?
cs_semester
select name from course where diff = ( select max(diff) from course )
Question: what is the name of the most difficult course? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. student -> stud...
what is the name of the most difficult course?
cs_semester
select count(student_id) from student where gpa between 3.1 and 3.7 and type = 'ug'
Question: among the students with a gpa of 3.1 to 3.7, how many of them are undergraduate students? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_...
among the students with a gpa of 3.1 to 3.7, how many of them are undergraduate students?
cs_semester
select credit from course where name = 'computer vision'
Question: what is the credit of the course named 'computer vision'? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. stud...
what is the credit of the course named 'computer vision'?
cs_semester
select t2.student_id from student as t1 inner join registration as t2 on t1.student_id = t2.student_id inner join course as t3 on t2.course_id = t3.course_id where t3.name = 'c for programmers' and t1.gpa = 2.5
Question: give the student's id of students with 2.5 gpa and enrolled in c for programmers. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, stud...
give the student's id of students with 2.5 gpa and enrolled in c for programmers.
cs_semester
select t1.l_name from student as t1 inner join registration as t2 on t1.student_id = t2.student_id inner join course as t3 on t2.course_id = t3.course_id where t3.name = 'intro to database 2' order by t2.sat desc limit 1
Question: give the student's last name that gave the highest student satisfaction for the course 'intro to database 2'. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. reg...
give the student's last name that gave the highest student satisfaction for the course 'intro to database 2'.
cs_semester
select count(t1.student_id) from ra as t1 inner join student as t2 on t1.student_id = t2.student_id where t1.salary = 'high' and t2.gpa > 3
Question: among the students with high salary, what is total number of students with a gpa higher than 3? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> c...
among the students with high salary, what is total number of students with a gpa higher than 3?
cs_semester
select t3.name from student as t1 inner join registration as t2 on t1.student_id = t2.student_id inner join course as t3 on t2.course_id = t3.course_id where t1.type = 'ug' order by t2.sat desc limit 1
Question: among undergraduate students, list the name of the course with the highest student satisfaction. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> ...
among undergraduate students, list the name of the course with the highest student satisfaction.
cs_semester
select t1.capability from ra as t1 inner join student as t2 on t1.student_id = t2.student_id where t2.type = 'rpg' and t2.intelligence >= 4
Question: list the capability of research postgraduate students with an intellegence level of 4 and above. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> ...
list the capability of research postgraduate students with an intellegence level of 4 and above.
cs_semester
select count(t1.student_id) from registration as t1 inner join student as t2 on t1.student_id = t2.student_id where t1.grade = 'b' and t2.intelligence = 3
Question: in students with a grade of b, how many of them have an intellegence level of 3? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, stude...
in students with a grade of b, how many of them have an intellegence level of 3?
cs_semester
select t3.diff from student as t1 inner join registration as t2 on t1.student_id = t2.student_id inner join course as t3 on t2.course_id = t3.course_id where t2.grade = 'a' and t1.intelligence = 5
Question: what is the difficulty of the course in which a student with level of intellengence of 5 got an a grade? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registra...
what is the difficulty of the course in which a student with level of intellengence of 5 got an a grade?
cs_semester
select count(t1.student_id) from ra as t1 inner join prof as t2 on t1.prof_id = t2.prof_id where t1.capability = 5 order by t2.popularity desc limit 1
Question: among professors with the highest popularity, how many of their students have research capability of 5? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registrat...
among professors with the highest popularity, how many of their students have research capability of 5?
cs_semester
select t1.name from course as t1 inner join registration as t2 on t1.course_id = t2.course_id where t2.grade = 'd'
Question: list the course's name where students acquired a grade of d. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. s...
list the course's name where students acquired a grade of d.
cs_semester
select t2.capability from student as t1 inner join ra as t2 on t1.student_id = t2.student_id where t1.f_name = 'alvera' and t1.l_name = 'mcquillin'
Question: what is the capability on research of the student named alvera mcquillin? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, ...
what is the capability on research of the student named alvera mcquillin?
cs_semester
select count(t1.student_id) from student as t1 inner join registration as t2 on t1.student_id = t2.student_id inner join course as t3 on t2.course_id = t3.course_id where t3.credit = 3 and t1.gpa = 3.2
Question: of courses with 3 credit, how many students have gpa of 3.2? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. s...
of courses with 3 credit, how many students have gpa of 3.2?
cs_semester
select count(t1.student_id) from ra as t1 inner join student as t2 on t1.student_id = t2.student_id where t2.gpa = 3.5 and t1.salary = 'low'
Question: among students with low salary, how many of them have a gpa of 3.5? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade,...
among students with low salary, how many of them have a gpa of 3.5?
cs_semester
select t2.email from registration as t1 inner join student as t2 on t1.student_id = t2.student_id inner join course as t3 on t1.course_id = t3.course_id where t1.grade = 'b' group by t3.diff having t3.diff > avg(t3.diff) * 0.8
Question: list the student's email with grade of b in a course with difficulty greater than the 80% of average difficulty of all courses. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, pr...
list the student's email with grade of b in a course with difficulty greater than the 80% of average difficulty of all courses.
cs_semester
select cast(sum(case when t1.salary = 'low' then 1 else 0 end) as real) * 100 / count(t1.salary) from ra as t1 inner join prof as t2 on t1.prof_id = t2.prof_id where t2.teachingability < 3
Question: among the professors with a teachability of 3 and below, what is the percentage of their student advisees with a low salary? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_...
among the professors with a teachability of 3 and below, what is the percentage of their student advisees with a low salary?
cs_semester
select name from course where credit = ( select max(credit) from course ) and diff = ( select max(diff) from course )
Question: find the most important and most difficult courses. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. student ->...
find the most important and most difficult courses.
cs_semester
select cast(sum(teachingability) as real) / count(prof_id) from prof where popularity = ( select max(popularity) from prof )
Question: what is the average teaching ability of the most popular professors? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade...
what is the average teaching ability of the most popular professors?
cs_semester
select cast(sum(sat) as real) / count(course_id) from registration where grade = 'b'
Question: calculate the average satisfaction of the good students with their courses. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id...
calculate the average satisfaction of the good students with their courses.
cs_semester
select f_name, l_name, phone_number from student where gpa > 3 and intelligence < 4
Question: among the students with less than four intelligence, list the full name and phone number of students with a greater than 3 gpa. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, pr...
among the students with less than four intelligence, list the full name and phone number of students with a greater than 3 gpa.
cs_semester
select t1.f_name, t1.l_name from student as t1 inner join ra as t2 on t1.student_id = t2.student_id where t2.capability > ( select avg(capability) from ra )
Question: name the students with above-average capability. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. student -> st...
name the students with above-average capability.
cs_semester
select t1.f_name, t1.l_name, t3.name from student as t1 inner join registration as t2 on t1.student_id = t2.student_id inner join course as t3 on t2.course_id = t3.course_id where t1.intelligence = 5 and t1.gpa < 3
Question: for the students with an intelligence of 5, list the full name and courses taken by them who have less than a 3 gpa. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, sala...
for the students with an intelligence of 5, list the full name and courses taken by them who have less than a 3 gpa.
cs_semester
select cast(sum(t1.capability) as real) / count(t1.student_id) from ra as t1 inner join student as t2 on t1.student_id = t2.student_id where t2.gpa < 2.5
Question: what is the average capability of students with less than a 2.5 gpa? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade...
what is the average capability of students with less than a 2.5 gpa?
cs_semester
select t1.first_name, t1.last_name from prof as t1 inner join ra as t2 on t1.prof_id = t2.prof_id inner join student as t3 on t2.student_id = t3.student_id where t3.intelligence = 1
Question: list the full name of the professors who advised students with intelligence 1. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student...
list the full name of the professors who advised students with intelligence 1.
cs_semester
select avg(t1.gpa) from student as t1 inner join registration as t2 on t1.student_id = t2.student_id inner join course as t3 on t2.course_id = t3.course_id where t3.diff in (2, 1) group by t3.diff
Question: what is the difference in the average gpa of students who took the hardest and easiest courses? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> c...
what is the difference in the average gpa of students who took the hardest and easiest courses?
cs_semester
select t2.f_name, t2.l_name, t1.capability from ra as t1 inner join student as t2 on t2.student_id = t1.student_id inner join registration as t3 on t2.student_id = t3.student_id where t3.grade is null or t3.grade = ''
Question: give the full name and capability of students who failed in any courses. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, g...
give the full name and capability of students who failed in any courses.
cs_semester
select count(t1.student_id) from ra as t1 inner join registration as t2 on t2.student_id = t1.student_id inner join course as t3 on t2.course_id = t3.course_id where t1.salary = 'high' and t3.name = 'computer vision'
Question: of the students with high salaries, how many took the computer vision course? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_...
of the students with high salaries, how many took the computer vision course?
cs_semester
select t1.first_name, t1.last_name, t1.popularity from prof as t1 inner join ra as t2 on t1.prof_id = t2.prof_id group by t1.prof_id order by count(t2.student_id) desc limit 1
Question: find the full name and popularity of the professor who advises the most number of students. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> cours...
find the full name and popularity of the professor who advises the most number of students.
cs_semester
select t3.name, t2.f_name, t2.l_name from registration as t1 inner join student as t2 on t1.student_id = t2.student_id inner join course as t3 on t1.course_id = t3.course_id where t1.grade = 'a' group by t3.name order by count(t1.student_id) desc limit 1
Question: please give the name of the course in which most numbers of the students got an a. also, list the full name of the students who got an a in this course. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> s...
please give the name of the course in which most numbers of the students got an a. also, list the full name of the students who got an a in this course.
cs_semester
select avg(t2.sat) - ( select avg(t2.sat) from ra as t1 inner join registration as t2 on t1.student_id = t2.student_id where t1.salary = 'free' ) as diff from ra as t1 inner join registration as t2 on t1.student_id = t2.student_id where t1.salary = 'high'
Question: calculate the difference between the average satisfaction of the students with high salaries and no salary. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. regis...
calculate the difference between the average satisfaction of the students with high salaries and no salary.
cs_semester
select t1.graduate_from from prof as t1 inner join ra as t2 on t1.prof_id = t2.prof_id inner join student as t3 on t2.student_id = t3.student_id where t3.type = 'ug' group by t1.prof_id order by count(t2.student_id) desc limit 1
Question: find the university from which the professor who advised most undergraduate students graduated. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> c...
find the university from which the professor who advised most undergraduate students graduated.
cs_semester
select t2.first_name, t2.last_name, t2.email from ra as t1 inner join prof as t2 on t1.prof_id = t2.prof_id where t2.teachingability > ( select avg(teachingability) from prof ) group by t2.prof_id having count(t1.student_id) >= 2
Question: among the professors with more than average teaching ability, list the full name and email address of the professors who advise two or more students. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> stud...
among the professors with more than average teaching ability, list the full name and email address of the professors who advise two or more students.
cs_semester
select cast(( select count(*) from course where name = 'intro to database 2' and course_id in ( select course_id from registration where sat = ( select max(sat) from registration ) ) ) as real) * 100 / count(t1.student_id) from registration as t1 inner join course as t2 on t1.course_id = t2.course_id where t2.name = '...
Question: what percentage of students are highly satisfied with the intro to database 2 course? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, ...
what percentage of students are highly satisfied with the intro to database 2 course?
cs_semester
select f_name, l_name from student where gpa = ( select max(gpa) from student )
Question: what is the first and last name of students with highest gpa? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, grade, sat. ...
what is the first and last name of students with highest gpa?
cs_semester
select count(t1.student_id) from ra as t1 inner join prof as t2 on t1.prof_id = t2.prof_id where t1.salary = 'high' order by t2.teachingability desc limit 1
Question: among professors with the highest teachability, how many of their students have high salary? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> cour...
among professors with the highest teachability, how many of their students have high salary?
cs_semester
select t1.salary from ra as t1 inner join student as t2 on t1.student_id = t2.student_id where t2.email = 'grosellg@hku.hk'
Question: what is the salary range of the student with an email of grosellg@hku.hk? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, student_id, ...
what is the salary range of the student with an email of grosellg@hku.hk?
cs_semester
select count(t1.student_id) from student as t1 inner join registration as t2 on t1.student_id = t2.student_id inner join course as t3 on t2.course_id = t3.course_id where t3.name = 'statistical learning' and t2.sat = 4 and t1.gpa = 3.8
Question: among students that gave satisfaction of value 4 for the course named 'statistical learning', how many of them have a gpa of 3.8? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, ...
among students that gave satisfaction of value 4 for the course named 'statistical learning', how many of them have a gpa of 3.8?
cs_semester
select count(t1.student_id) from student as t1 inner join registration as t2 on t1.student_id = t2.student_id inner join course as t3 on t2.course_id = t3.course_id where t3.diff = 3 and t1.intelligence = 2
Question: among courses with difficulty of 3, how many students have intellegence level of 2? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> course_id, st...
among courses with difficulty of 3, how many students have intellegence level of 2?
cs_semester
select t1.f_name, t1.l_name from student as t1 inner join registration as t2 on t1.student_id = t2.student_id inner join course as t3 on t2.course_id = t3.course_id where t3.name = 'applied deep learning ' and t2.grade = 'c'
Question: list the student's first and last name that got a c in the course named 'applied deep learning'. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. registration -> ...
list the student's first and last name that got a c in the course named 'applied deep learning'.
cs_semester
select t3.name from student as t1 inner join registration as t2 on t1.student_id = t2.student_id inner join course as t3 on t2.course_id = t3.course_id where t2.sat = 1 and t1.type = 'rpg'
Question: among research postgraduate students, give the name of the course with the student satisfaction value of 1. | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability, prof_id, salary. regis...
among research postgraduate students, give the name of the course with the student satisfaction value of 1.
cs_semester
select sum(case when t2.type = 'ug' then 1 else 0 end) - sum(case when t2.type = 'rpg' then 1 else 0 end) from ra as t1 inner join student as t2 on t1.student_id = t2.student_id where t1.capability < 3
Question: among the students with a capability below 3, what is the difference of undergraduate students from research postgraduate students? | Tables: course -> course_id, name, credit, diff. prof -> prof_id, gender, first_name, last_name, email, popularity, teachingability, graduate_from. RA -> student_id, capability...
among the students with a capability below 3, what is the difference of undergraduate students from research postgraduate students?
computer_student
select cast(count(p_id) as real) / count(distinct p_id_dummy) as avgnum from advisedby group by p_id_dummy
Question: what is the average number of students for each advisor? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = person.p_id, ...
what is the average number of students for each advisor?
computer_student
select count(distinct p_id) from taughtby where course_id = 18
Question: how many professors are teaching course id 18? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = person.p_id, taughtBy.c...
how many professors are teaching course id 18?
computer_student
select course_id from course where courselevel = 'level_500'
Question: list all the course ids for professional or master/graduate courses. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = p...
list all the course ids for professional or master/graduate courses.
computer_student
select count(course_id) from course where courselevel = 'level_300'
Question: how many courses are there for basic or medium undergraduate courses? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = ...
how many courses are there for basic or medium undergraduate courses?
computer_student
select t2.p_id, t2.course_id from person as t1 inner join taughtby as t2 on t1.p_id = t2.p_id where t1.professor = 1 and t1.hasposition <> 0
Question: list the id of all professors who are not faculty member along with the courses taught by him/her. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person....
list the id of all professors who are not faculty member along with the courses taught by him/her.
computer_student
select t2.p_id from course as t1 inner join taughtby as t2 on t1.course_id = t2.course_id where t1.courselevel = 'level_400'
Question: provide the id of professors who are teaching high-level or harder undergraduate course. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advi...
provide the id of professors who are teaching high-level or harder undergraduate course.
computer_student
select t3.course_id from advisedby as t1 inner join person as t2 on t1.p_id = t2.p_id inner join taughtby as t3 on t2.p_id = t3.p_id where t1.p_id = 141
Question: what are the courses taught by the advisors who gave advice to student with id 376? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy...
what are the courses taught by the advisors who gave advice to student with id 376?
computer_student
select t1.p_id from advisedby as t1 inner join person as t2 on t1.p_id = t2.p_id where t2.yearsinprogram = 'year_3'
Question: name the advisors for students in year 3 of the program. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = person.p_id, ...
name the advisors for students in year 3 of the program.
computer_student
select t1.courselevel from course as t1 inner join taughtby as t2 on t1.course_id = t2.course_id where t2.p_id = 297
Question: which level of courses is taught by professor id 297? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = person.p_id, tau...
which level of courses is taught by professor id 297?
computer_student
select t1.courselevel, t2.p_id from course as t1 inner join taughtby as t2 on t1.course_id = t2.course_id where t2.course_id = 165
Question: what level is course 165? list the professors who teach the course. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = pe...
what level is course 165? list the professors who teach the course.
computer_student
select t1.p_id, t2.yearsinprogram from advisedby as t1 inner join person as t2 on t1.p_id = t2.p_id where t1.p_id_dummy = 5
Question: list the id and years in program for students taught by advisor with id 5. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dum...
list the id and years in program for students taught by advisor with id 5.
computer_student
select t3.course_id, t3.courselevel from taughtby as t1 inner join person as t2 on t1.p_id = t2.p_id inner join course as t3 on t3.course_id = t1.course_id where t2.hasposition = 'faculty_eme'
Question: state the courses and level of courses by professors who are faculty employees. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_i...
state the courses and level of courses by professors who are faculty employees.
computer_student
select t1.p_id_dummy, t2.courselevel from advisedby as t1 inner join course as t2 on t1.p_id = t2.course_id inner join taughtby as t3 on t2.course_id = t3.course_id where t1.p_id = 80
Question: find the id of advisor of student id 80 and state the level of courses taught by him/her. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, adv...
find the id of advisor of student id 80 and state the level of courses taught by him/her.
computer_student
select distinct t2.p_id from course as t1 inner join taughtby as t2 on t1.course_id = t2.course_id where t1.courselevel = 'level_400' or t1.courselevel = 'level_500'
Question: provide the id of professors who teach in both harder undergraduate course and master/graduate courses. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = pe...
provide the id of professors who teach in both harder undergraduate course and master/graduate courses.
computer_student
select t1.p_id_dummy from advisedby as t1 inner join person as t2 on t1.p_id = t2.p_id where t2.yearsinprogram = 'year_12'
Question: who are the professors who gave advice to students in the 12th years of program? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_...
who are the professors who gave advice to students in the 12th years of program?
computer_student
select t1.course_id, t1.courselevel from course as t1 inner join taughtby as t2 on t1.course_id = t2.course_id group by t1.course_id, t1.courselevel order by count(t1.course_id) desc limit 1
Question: which are the courses with the most number of professors? state the course id and the level of the course. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id =...
which are the courses with the most number of professors? state the course id and the level of the course.
computer_student
select count(*) from course where courselevel = 'level_300'
Question: how many basic and medium undergraduate courses are there? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = person.p_id...
how many basic and medium undergraduate courses are there?
computer_student
select count(*) from taughtby where course_id = 11
Question: how many people teaches course no.11? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = person.p_id, taughtBy.course_id ...
how many people teaches course no.11?
computer_student
select course_id from taughtby where course_id = 11 or course_id = 18 group by course_id order by count(course_id) desc limit 1
Question: which course has more teachers, course no.16 or course no.18? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = person.p...
which course has more teachers, course no.16 or course no.18?
computer_student
select count(*) from person where hasposition = 'faculty_eme'
Question: how many teachers are faculty employees? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = person.p_id, taughtBy.course_...
how many teachers are faculty employees?
computer_student
select p_id_dummy from advisedby group by p_id_dummy having count(p_id_dummy) > 4
Question: please list the ids of the teachers who have advised more than 4 others to teach. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p...
please list the ids of the teachers who have advised more than 4 others to teach.
computer_student
select count(*) from course as t1 inner join taughtby as t2 on t1.course_id = t2.course_id inner join person as t3 on t3.p_id = t2.p_id where t1.courselevel = 'level_300' and t3.professor = 1
Question: how many basic or medium undergraduate courses are taught by a professor? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dumm...
how many basic or medium undergraduate courses are taught by a professor?
computer_student
select t2.p_id from course as t1 inner join taughtby as t2 on t1.course_id = t2.course_id inner join person as t3 on t3.p_id = t2.p_id where t1.courselevel = 'level_300' and t3.hasposition = 'faculty_eme'
Question: please list the ids of all the faculty employees who teaches a basic or medium undergraduate course. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = perso...
please list the ids of all the faculty employees who teaches a basic or medium undergraduate course.
computer_student
select t2.hasposition from taughtby as t1 inner join person as t2 on t1.p_id = t2.p_id where t1.course_id = 9
Question: is the teacher who teaches course no.9 a faculty member? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = person.p_id, ...
is the teacher who teaches course no.9 a faculty member?
computer_student
select t1.courselevel from course as t1 inner join taughtby as t2 on t1.course_id = t2.course_id where t2.p_id = 79
Question: please list the levels of the all courses taught by teacher no.79. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = per...
please list the levels of the all courses taught by teacher no.79.
computer_student
select t1.p_id_dummy from advisedby as t1 inner join person as t2 on t1.p_id = t2.p_id where t2.yearsinprogram = 'year_5'
Question: please list the ids of the advisors of the students who are in the 5th year of their program. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id,...
please list the ids of the advisors of the students who are in the 5th year of their program.
computer_student
select count(distinct t4.p_id) from person as t1 inner join taughtby as t2 on t1.p_id = t2.p_id inner join course as t3 on t3.course_id = t2.course_id inner join advisedby as t4 on t4.p_id = t1.p_id where t1.professor = 1 and t3.courselevel = 'level_300'
Question: how many students are advised to teach by a professor teaching basic or medium undergraduate courses? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = pers...
how many students are advised to teach by a professor teaching basic or medium undergraduate courses?
computer_student
select count(*) from course as t1 inner join taughtby as t2 on t1.course_id = t2.course_id inner join person as t3 on t2.p_id = t3.p_id where t3.professor = 1 and t1.courselevel = 'level_300'
Question: among the courses that are basic or medium undergraduate courses, how many of them are taught by a faculty member? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedB...
among the courses that are basic or medium undergraduate courses, how many of them are taught by a faculty member?
computer_student
select t2.course_id from taughtby as t1 inner join course as t2 on t1.course_id = t2.course_id inner join advisedby as t3 on t3.p_id = t1.p_id where t1.p_id = 9
Question: for the professor who advised student no.6, please list the ids of the courses he or she teaches. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p...
for the professor who advised student no.6, please list the ids of the courses he or she teaches.
computer_student
select t1.courselevel from course as t1 inner join taughtby as t2 on t1.course_id = t2.course_id group by t2.course_id order by count(t2.p_id) desc limit 1
Question: what is the level of the course with the most number of teachers? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy = pers...
what is the level of the course with the most number of teachers?
computer_student
select t1.p_id from taughtby as t1 inner join person as t2 on t1.p_id = t2.p_id where t2.professor = 1 group by t1.p_id having count(distinct t1.course_id) > 3
Question: please list the ids of the professors that teaches more than 3 courses. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dummy ...
please list the ids of the professors that teaches more than 3 courses.
computer_student
select t1.p_id from taughtby as t1 inner join person as t2 on t1.p_id = t2.p_id where t2.professor = 1 group by t1.p_id order by count(*) desc limit 3
Question: please list the ids of the top 3 professors that teaches the most courses. | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_id, advisedBy.p_id_dum...
please list the ids of the top 3 professors that teaches the most courses.
computer_student
select count(distinct t1.p_id_dummy) from advisedby as t1 inner join person as t2 on t1.p_id = t2.p_id where t2.yearsinprogram = 'year_3'
Question: in total, all the students in the 3rd year of their program are advised by how many professors? | Tables: course -> course_id, courseLevel. person -> p_id, professor, student, hasPosition, inPhase, yearsInProgram. advisedBy -> p_id, p_id_dummy. taughtBy -> course_id, p_id. | Joins: advisedBy.p_id = person.p_i...
in total, all the students in the 3rd year of their program are advised by how many professors?