Question: QUESTION 1 Based on the code above, list the number, name, and balance of all customers with balances greater than or equal to $2,000 and

QUESTION 1

Based on the code above, list the number, name, and balance of all customers with balances greater than or equal to $2,000 and less than or equal to $5,000.

a.

SELECT CustomerName, Balance FROM Customer WHERE Balance BETWEEN 2000 AND 5000 ;

b.

SELECT CustomerNum, CustomerName, Balance FROM Customer WHERE Balance BETWEEN 2000 AND 5000 ;

c.

SELECT CustomerNum, CustomerName FROM Customer WHERE Balance BETWEEN 2000 AND 5000 ;

d.

SELECT CustomerNum, CustomerName, Balance FROM Customer WHERE Balance > 2000 ;

QUESTION 2

Based on the code above, list the number and name of all customers that are either represented by sales rep 30 or that currently have orders on file, or both.

a.

SELECT CustomerNum, CustomerName, FROM Customer WHERE RepNum=30 WHERE Customer.CustomerNum=Orders.CustomerNum ;

b.

SELECT CustomerNum, CustomerName, FROM Customer WHERE RepNum=30 UNION SELECT Customer.CustomerNum, CustomerName, FROM Customer, Orders ;

c.

SELECT CustomerNum, CustomerName, FROM Customer WHERE RepNum=30 UNION SELECT Customer.CustomerNum, CustomerName, FROM Customer, Orders WHERE Customer.CustomerNum=Orders.CustomerNum ;

d.

SELECT CustomerNum, CustomerName, FROM Customer WHERE RepNum=30 UNION SELECT Customer.CustomerNum, CustomerName, FROM Customer ;

QUESTION 3

Based on the code above, list the descriptions of all items that are located in Storehouse 3 or for which there are more than 20 units on hand, or both.

a.

SELECT Description FROM Customer WHERE Storehouse=3 AND OnHand>20 ;

b.

SELECT Description FROM Item WHERE Storehouse=3 ;

c.

SELECT Description FROM Item WHERE Storehouse=3 OR OnHand>20 ;

d.

SELECT Description FROM Item WHERE OnHand>20 ;

QUESTION 4

Based on the code above, list the descriptions of all items that are located in Storehouse3 and for which there are more than 20 units on hand.

a.

SELECT Description FROM Item WHERE Storehouse=3 OR OnHand>20 ;

b.

SELECT Description FROM Item WHERE Storehouse=3 ;

c.

SELECT Description FROM Customer WHERE Storehouse=3 AND OnHand>20 ;

d.

SELECT Description FROM Item WHERE Storehouse=3 AND OnHand>20 ;

QUESTION 5

1.

Based on the code above, list the number, name, credit limit, and balance for all customers with credit limits that exceed their balances.

a.

SELECT CustomerNum, CustomerName, CreditLimit, Balance FROM Customer ;

b.

SELECT CustomerNum, CustomerName, Balance FROM Customer WHERE CreditLimit>Balance ;

c.

SELECT CustomerNum, CustomerName FROM Customer WHERE CreditLimit>Balance ;

d.

SELECT CustomerNum, CustomerName, CreditLimit, Balance FROM Customer WHERE CreditLimit>Balance ;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!