Ask a Question
  
  
  
Top Posters
Since Sunday
24
15
11
10
9
9
9
8
8
7
7
7
New Topic  
wrote...
Posts: 37
Rep: 6 0
6 days ago
Which of the following SQL statements is a correctly stated correlated subquery?

• SELECT C1.CustName, C1.SalesRepNo
FROM CUSTOMER C1
WHERE C1.SalesRepNo IN
(SELECT S1.SalesRepNo
FROM SALESREP S1
WHERE S1.RepName = 'Smith');

• SELECT C1.CustName, C1.SalesRepNo
FROM CUSTOMER C1
WHERE C1.SalesRepNo IN
(SELECT S1.SaleRepNo
FROM SALESREP S1
WHERE S1.RepName = 'Smith')
AND C1.SalesRepNo=S1.SalesRepNo);

• SELECT C1.CustName, C1.SalesRepNo
FROM CUSTOMER C1
WHERE C1.SalesRepNo IN
(SELECT S1.SaleRepNo
FROM SALESREP S1
WHERE S1.RepName = 'Smith')
AND C1.SalesRepNoS1.SalesRepNo);

• SELECT C1.CustName, C1.SalesRepNo
FROM CUSTOMER C1
WHERE C1.SalesRepNo IN
(SELECT C2.SaleRepNo
FROM CUSTOMER C2
WHERE C1.SalesRepNo=C2.SalesRepNo);
AND C1.OrderNoC2.OrderNo);
Source  Download Study Guide
Database Processing: Fundamentals, Design, and Implementation
Edition: 15th
Authors:
Read 10 times
3 Replies
Replies
Answer verified by a subject expert
wrote...
Posts: 28
Rep: 7 0
6 days ago
Sign in or Sign up in seconds to unlock everything on Biology Forums.
SELECT C1.CustName, C1.SalesRepNo
FROM CUSTOMER C1
WHERE C1.SalesRepNo IN
(SELECT C2.SaleRepNo
FROM CUSTOMER C2
WHERE C1.SalesRepNo=C2.SalesRepNo);
AND C1.OrderNoC2.OrderNo);
1
Related Topics
wrote...
6 days ago
Thank you for answering so quickly
wrote...
6 days ago
Was feeling bored, my pleasure Grinning Face with Smiling Eyes
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers.
Learn More
Improve Grades
Help Others
Save Time
Accessible 24/7
  183 People Browsing
 117 Signed Up Today
Related Images
 90
 117
 95