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: 3861607 • Letter: U

Question

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

1. For each student, show their first and last name and the number of credits for courses they passed (did not receive an F or W) in SQL.

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

1.For each student, show their first and last name and the number of credits for courses they passed (did not receive an F or W) in SQL

sol:select s. FirstName,s.LastName ,c.NumCredits ,c.CourseName, t.Grade from Student s, Takes t
where s.sid=t.sid and c.cid=t.cid and t.grade in (select grade from GradeValue where value <>0.0);