Question

Based on the tables below, which of the following commands in ANSI SQL would return only the name of the sales representative and the name of the customer for each customer that has a balance greater than 400?
GENERAL SALES DATABASE:
SALESREP
SalesRepNo RepName HireDate
654 Jones 01/02/2005
734 Smith 02/03/2007
345 Chen 01/25/2004
434 Johnson 11/23/2004

CUSTOMER
CustNo CustName Balance SalesRepNo
9870 Winston 500 345
8590 Gonzales 350 434
7840 Harris 800 654
4870 Miles 100 345

A) SELECT *
FROM SALESREP, CUSTOMER
WHERE Balance > 400;
B) SELECT DISTINCT RepName, CustName
FROM SALESREP, CUSTOMER
WHERE Balance > 400;
C) SELECT *
FROM SALESREP, CUSTOMER
WHERE SALESREP.SalesRepNo = CUSTOMER.SalesRepNo
AND Balance > 400;
D) SELECT RepName, CustName
FROM SALESREP, CUSTOMER
WHERE SALESREP.SalesRepNo = CUSTOMER.SalesRepNo
AND Balance > 400;

Answer

This answer is hidden. It contains 1 characters.