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

Using the following tables Student (S), Course (C), Takes (T), and GradeValue (G

ID: 3861609 • Letter: U

Question

Using the following tables Student (S), Course (C), Takes (T), and GradeValue (GV).

2. For each student, write a query in SQL to show the student first and last name and their GPA, GPA is the sum of their grade values (from that table) for each class grade times the number of credits for that class (except that Ws are not included) divided by the total number of non W credits the student has.

1. Given the following table schemas as used in class (with primary keys shown with over them in SQL Student (S) SID LastName FirstName Course (C) CID DeptName DeptNumber Numcredits Co Takes T) SID CID Semester Grade Grade Value (GV) Grade Value 4.0 A- 3.7 B+ 3.3 3.0 2.7 C+ 2.3 C 2.0 C- 1.7 D+ 1.3 1.0 0.0 0.0

Explanation / Answer

Select FirstName,Lastname,sum(value)*numCredits/sum(numCredits) "GPA" from student s,course c,GradeValue g,Takes t Where s.sid=t.sid and g.grade=t.grade and c.cid=t.cid and g.grade<>'W' group by FirstName;