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

Here is the Tables --Creat tables starting with parent tables CREATE TABLE DISTR

ID: 3540820 • Letter: H

Question

Here is the Tables --Creat tables starting with parent tables CREATE TABLE DISTRIBUTOR ( DistributorNo NUMBER(3) CONSTRAINT distributorno_pk PRIMARY KEY, Name VARCHAR (25), Contact VARCHAR (20), Phone CHAR(12), State VARCHAR(2) ); INSERT INTO DISTRIBUTOR VALUES (130, 'Dinfad Inc.', 'Smithson', '562-223-3234', 'NY'); INSERT INTO DISTRIBUTOR VALUES (131, 'Dearborn Suppliers', 'Jones', '732-243-1213', 'NJ'); INSERT INTO DISTRIBUTOR VALUES (132, 'Floor People', 'Stapleton', '713-562-7563', 'TX'); INSERT INTO DISTRIBUTOR VALUES (133, 'Smithe Anderson', 'Anderson', '218-890-1345', 'NY') ; INSERT INTO DISTRIBUTOR VALUES (134, 'Raritan Mowers', 'Shakleford', '203-213-9078', 'CT') ; INSERT INTO DISTRIBUTOR VALUES (135, 'Kenosha Systems', 'Williams', '630-731-9034', 'IL') ; CREATE TABLE ITEMZ ( ItemCode NUMBER(5) CONSTRAINT type_code_pk PRIMARY KEY, Description VARCHAR (25), QtyOnHand NUMBER(5), Price NUMBER(7,2), DistributorNo NUMBER(3) ); ALTER TABLE ITEMZ ADD FOREIGN KEY (DistributorNo) REFERENCES DISTRIBUTOR (DistributorNo); INSERT INTO ITEMZ VALUES (2114, 'Sandstone', 240, 45.45, 132); INSERT INTO ITEMZ VALUES (2115, 'Snow Blower', 320, 623.99, 135); INSERT INTO ITEMZ VALUES (2116, 'Metal Sheets', 590, 27.95, 131); INSERT INTO ITEMZ VALUES (2117, 'Granite', 190, 89.45, 132); INSERT INTO ITEMZ VALUES (2118, 'Oak Cabinet', 100, 65.00, 132); INSERT INTO ITEMZ VALUES (2119, 'Faucet', 240, 189.40, 135); CREATE TABLE CUSTOMERZ ( CustNo NUMBER(3) CONSTRAINT custno_pk PRIMARY KEY, OrderDate DATE, QtyOrdered NUMBER(6), ItemCode NUMBER(5) ); ALTER TABLE CUSTOMERZ ADD FOREIGN KEY (ItemCode) REFERENCES ITEMZ (ItemCode); INSERT INTO CUSTOMERZ VALUES (230, '30-Nov-2006', 430, 2114); INSERT INTO CUSTOMERZ VALUES (231, '24-Nov-2006', 25, 2116); INSERT INTO CUSTOMERZ VALUES (232, '31-Dec-2006', 190, 2117); INSERT INTO CUSTOMERZ VALUES (233, '17-Oct-2006', 135, 2117); INSERT INTO CUSTOMERZ VALUES (234, '09-Jan-2007', 65, 2115); INSERT INTO CUSTOMERZ VALUES (235, '11-Dec-2006', 120, 2119); --Populate tables with data, starting with parent tables first COMMIT; 1. using a subquery, display all columns in the distributor table for row()s that have/has the least item price? 2. construct the SQL code that displays the customer number, item description, cost (QtyOnHand multiplied by item price (i.e QtyOnHand * price. Name the derived column Cost. Also, appropriately format the derived column to display the dollar sign and two places of decimal?

Explanation / Answer

it making no sense can you repost it properly

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote