Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need the SQL statements for these. If you aren\'t sure of your answers its oka

ID: 3831066 • Letter: I

Question

I need the SQL statements for these. If you aren't sure of your answers its okay, they dont have to be 100% right. I would just like them all answered, and as correct as possible. Thank you.

3) Define a view named CUST ORDER. It consists of the customer number, customer name, balance, order number, and order date for every order on file. a) Write what the actual VIEW command would be. b) Execute the SELECT portion of the VIEW command. c) Write the command to retrieve the customer number, customer name, order number, and order date for every order in the CUST ORDER view query for only those gustomers with balances of no more than $5,000 d) rite and execute the query that the DBMS actually executes.

Explanation / Answer

use DB_NAME;

A)CREATE VIEW [CUST_ORDER] AS

SELECT T1.CUSTOMER_NUM,T1.CUSTOMER_NAME,T1.BALANCE,T2.ORDER_NUM,T2.ORDER_DATE
FROM table_name1 T1, table_name T2 WHERE T1.CUSTOMER_NUM = T2.CUSTOMER_NUM

B)SELECT * FROM [CUST_ORDER]

C)SELECT CUSTOMER_NAME,CUSTOMER_NUMM,ORDER_DATE FROM [CUST_ORDER]
WHERE BALANCE > $5000;

give table name in place of table_name in the first query