Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the following table structures: Student ( sno , sname, gpa ) Reg ( sno , cno, grade ) Course ( cno , cname, credits

Given the following table structures:
Student(sno, sname, gpa)
Reg(sno, cno, grade)
Course(cno, cname, credits)
Which of the following SQL statements will find students who have registered for more than 10 credit hours?
SELECT s.sno, s.sname
FROM Student s, Reg r, Course c
WHERE s.sno = r.sno AND c.cno = r.cno
HAVING SUM(c.credits)>10
SELECT s.sno, s.sname
FROM Student s, Reg r, Course c
WHERE s.sno = r.sno AND c.cno = r.cno
HAVING COUNT(c.credits)>10
SELECT s.sno, s.sname
FROM Student s, Reg r, Course c
WHERE s.sno = r.sno AND c.cno = r.cno
AND count(c.credits)>10
None of the others will work
SELECT s.sno, s.sname
FROM Student s, Reg r, Course c
WHERE s.sno = r.sno AND c.cno = r.cno
AND SUM(c.credits)>10
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial And Temporal Databases 10th International Symposium Sstd 2007 Boston Ma Usa July 2007 Proceedings Lncs 4605

Authors: Dimitris Papadias ,Donghui Zhang ,George Kollios

2007th Edition

3540735399, 978-3540735397

More Books

Students also viewed these Databases questions

Question

11. A hypothesis includes both independent and dependent variables.

Answered: 1 week ago