. 1. For each customer that has placed an order, list each: The company name The item Description The manufacturer The quantity ordered • The total price paid Include the following columns in the order given below: . From Customer Table: Company • From Stock Table: Description . From the Manufact Table: Manu_Name • From the Items Table: Quantity, Total Price Order the output by Company and Description Submit/hand in script and Output from SQL query 2. a) How many orders were shipped between December 25, 1999 and January 5, 2000 B) List all orders with a shipping date of January 8, 2000 Include 1) The Order Number 2) Order Date 3) Customer company name 4) Shipping Date: Order by Customer Company Name and Order Number Submit/hand in script and Output from SQL query 3. How many customers have not placed an order? Submithand in script and Output from SQL query 4. List all customers D) Who are ordering equipment with a description that contains ball. II) Include 1) Customer number 2) Stock number, and 3) Description Submithand in script and Output from SQL query Do not repeat any rows 5. Use the following SQL CREATE commands to CREATE the following tables in your User ID CREATE TABLE Professor (Prof_ID NUMBER(3) Constraint pk Professor Primary key.
NOT NULL Prof_thame VARCHAR2(15) Prof_Hiredate DATE Prof_Sal NUMBER(8,2). Prof_Dept CHAR(6) : CREATE TABLE Student (Stu_ID NUMBER(4) Constraint pk_Student Primary Kay, Stu_lname VARCHAR2(15) NOT NULL, Stu_Major CHAR(G). Stu_Credits NUMBER(4), Stu_GradePts NUMBER(S). Prol_ID NUMBER(3). CONSTRAINT fk_Student_Prof_ID FOREIGN KEY(Prof_ID) REFERENCES Professor Submit/Hand in: Print out of the Create commands, the systom response and a DESCRIBE of the tables created. 6. Insert the following data into the tables created above using SQL INSERT commands. Professor Table: Prof_ID Prof_lname Prof_Hiredate Prof_Sal Prof_Dept 1223 Hilbert 20-MAY-1992 58000.00 MATH 243 Newell 15-JUL-1997 65500.00 CMPSCI 389 Lessing 04-APR-1988 40250.00 ENG Student Table: StuID Stu_lname Parker Smith Prof_ID 243 2001 2166 Stu_Major Stu_CredHrs Stu_Grade Pts CMPSCI 52 160 ENG 30 75 MATH 62 248 CMPSCI 45 157 389 3200 Garcia 123 4520 Smith NULL
BE SURE TO ISSUE A COMMIT AFTER TABLE MODIFICATION COMMANDS HAVE BEEN RUN SUCCESSFULLY. Submit a Listing of each INSERT command, The systems response and the resulting tables after the INSERTS are completed (Example: SELECT * FROM Student;). 7. Perform the following SQL DELETE statements. Be sure to do them in order. Issue a COMMIT command after all DELETEs have run. a) Try to delete Professor 389. What message do you get? b) Delete Student 2166. c) Now Delete Professor 389. Explain why the first attempt in a was the DELETE was successful. Submit/hand in: A listing of the DELETE statements. The answers to questions b. and C. A listing of the two tables after the deletes have run. unsuccessful, and this time . . 8. Perform the following UPDATE commands. Issue a COMMIT command after each UPDATEs have run. a. Make the Prof_ID for Student 4520 be 1223. b. Change what each professor is paid to be two and a half times what they earn now Submit/hand in: A listing of the UPDATE statements A listing of the two tables after the UPDATEs have run.
. 1. For each customer that has placed an order, list each: The company name The item Description The manufacturer The q
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
. 1. For each customer that has placed an order, list each: The company name The item Description The manufacturer The q
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!