Which of the following SQL statements is a correctly stated correlated subquery?
A) SELECT C1.CustName, C1.SalesRepNo
FROM CUSTOMER C1
WHERE C1.SalesRepNo IN
(SELECT S1.SalesRepNo
FROM SALESREP S1
WHERE S1.RepName = 'Smith');
B) 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);
C) 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);
D) 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.OrderNo<>C2.OrderNo);
D
You might also like to view...
Inherent risk associated with officer compensation is frequently set high because officers have motive and opportunity to take advantage of their high-ranking offices in the form of excessive compensation.
Answer the following statement true (T) or false (F)
Answer the following statements true (T) or false (F)
1. One of the factors that determines base pay is what competitors are paying. 2. Stock options are considered a benefit, as part of a compensation package. 3. Benefits are additional nonmonetary forms of compensation designed to enrich the lives of all employees in the organization, which are paid all or in part by the organization. 4. In the United States, benefits account for only about 10% of total employment compensation.
The components that make up your image are:
a. how you behave and how you speak. b. how you look, how you speak, and how you behave. c. how you look and how you behave. d. None of the answers are correct.
Electrical fires often generate heat and smoke as quickly as conventional fires do
a. True b. False Indicate whether the statement is true or false