Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Select stu.student_id, stu.first_name, stu.last_name, sum(C.Cost) TotalCost From

ID: 3775480 • Letter: S

Question

Select stu.student_id,

stu.first_name,

stu.last_name,

sum(C.Cost) TotalCost

From Course C

inner join Section S

on C.Course_No = S.Course_No

Inner Join Enrollment E

on S.Section_ID = E.Section_ID

Inner Join Student stu

on E.Student_ID = Stu.Student_ID

Group by stu.student_id, stu.first_name, stu.last_name

order by Stu.Student_id

The query without changes should yield 165 students.

how many students have paid more than $3000 in tuition.

What statement do I have to add to change the query so that only students that have more than $3000 tuition are displayed?

Explanation / Answer

To list only students who paid more than 3000 as tuition:

Select stu.student_id,

stu.first_name,

stu.last_name,

sum(C.Cost) TotalCost

From Course C

inner join Section S

on C.Course_No = S.Course_No

Inner Join Enrollment E

on S.Section_ID = E.Section_ID

Inner Join Student stu

on E.Student_ID = Stu.Student_ID

Group by stu.student_id, stu.first_name, stu.last_name

Having TotalCost > 3000

order by Stu.Student_id

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote