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

please give a uniqe answer and not hand writing thanks ..... You have three tabl

ID: 3574899 • Letter: P

Question

please give a uniqe answer and not hand writing thanks .....

You have three tables in your relational database: Student, Course, and TakenBy.

What information will result from the following SQL query applied to this relational database?
SELECT StudentID, Name
FROM Student, TakenBy
WHERE Student.StudentID=TakenBy.StudentID
AND CourseID=C1
AND GradeEarned=A;

Student Course Student D Name Address Course ID Description No Credits Informatics 3 Ahmed 8892 Madinah St. Sultan 1262 Jeddah St. Math S3 Rached 1495 King St. C3 Marketing TakenB StudentID CourselD Semester GradeEarned 1 Sp2016 A C1 1 RC3 Sp 2016 B+ S1 C2 Fa A- 2016 PS2 C1 Sp 2016 B S2 C2 Fa 2016 A S2 Fa 2016 A S3 C1 Fa 2016 A S3 C2 Fa 2016 B+

Explanation / Answer

Actually it will give error as ambiguous column defined for StudentID in select. Please change that to

select student.StudentID,name

The condition matches for 3 common records in both tables and for all students as all have enrolled for course C1 and earned A in all those. so the output will be like

StudentID | Name

------------------------

S1 Ahmed

S2 Sultan

S3 Rached