PrepAway - Latest Free Exam Questions & Answers

What would the result be?

Given the following tables with the given data:
STUDENT
——————name id
—– —–Jim 1
Sarah 2
Frank 3
PROFESSOR
——————name course
—– —–Jenny PHY_102
Mark MAT_202
Angie DB_101
Jenny CSI_201
ENROLL
——————student_id course_id
—— —–

2 PHY_102
2 DB_101
3 PHY_102
1 CSI_201
3 MAT_202
After executing the query:
SELECT P.name, COUNT AS COUNT FROM STUDENT LEFT JOIN ENROLL
ON id=student_id, PROFESSOR AS P
GROUP BY P.name
What would the result be?

PrepAway - Latest Free Exam Questions & Answers

A.
NAME COUNT
—————- ——–Angie 1
Jenny 3
Mark 1

B.
NAME COUNT
—————- ——–Angie 6
Jenny 12
Mark 6

C.
NAME COUNT
—————- ——–Angie 1
Jenny 2
Mark 1

D.
NAME COUNT
—————- ——–Angie 3
Jenny 6
Mark 3

Explanation:


Leave a Reply