List the order number and order date for every order that was placed by Mary Nelson and that contains an order line for an iron. Use an INTERSECT operator. table name is:ORDER_LINE ORLN_ORDER_NUMBER ORLN_PART_NUMBER ORLN_NUMBER_ORDERED ORLN_QUOTED_PRICE tablename is ORDER_TABLE ORDR_ORDER_NUMBER ORDR_ORDER_DATE ORDR_CUSTOMER_NUMBER tablename is CUSTOMER CUST_NUMBER CUST_LAST CUST_FIRST CUST_STREET CUST_CITY CUST_STATE CUST_ZIP_CODE CUST_BALANCE CUST_CREDIT_LIMIT CUST_SALES_REP_NUM tablename is PART PART_NUMBER PART_DESCRIPTION UNITS_ON_HAND ITEM_CLASS WAREHOUSE UNIT_PRICE tablename is SALES_REP SLSR_PK SLSR_LAST SLSR_FIRST SLSR_STREET SLSR_CITY SLSR_STATE SLSR_ZIP_CODE SLSR_TOTAL_COMMISSION SLSR_COMMISSION_RATE SELECT ORDR_ORDER_NUMBER, ORDR_ORDER_DATE FROM ORDER_TABLE WHERE ORDR_ORDER_NUMBER IN ( SELECT ORLN_ORDER_NUMBER FROM ORDER_LINE WHERE ORLN_PART_NUMBER IN ( SELECT PART_NUMBER FROM PART WHERE PART_DESCRIPTION = 'iron' ) ) AND ORDR_CUSTOMER_NUMBER IN ( SELECT CUST_NUMBER FROM CUSTOMER WHERE CUST_LAST = 'Nelson' AND CUST_FIRST = 'Mary' ); above is the command i entered but when i entered it, it told me no data found. all the tables above show the tables created and their exact data for each table. please help i have tried everything and still keep getting "no data found". How will the command look like?
List the order number and order date for every order that was placed by Mary Nelson and that
contains an order line for an iron. Use an INTERSECT operator.
table name is:ORDER_LINE
ORLN_ORDER_NUMBER
ORLN_PART_NUMBER
ORLN_NUMBER_ORDERED
ORLN_QUOTED_PRICE
tablename is ORDER_TABLE
ORDR_ORDER_NUMBER
ORDR_ORDER_DATE
ORDR_CUSTOMER_NUMBER
tablename is CUSTOMER
CUST_NUMBER
CUST_LAST
CUST_FIRST
CUST_STREET
CUST_CITY
CUST_STATE
CUST_ZIP_CODE
CUST_BALANCE
CUST_CREDIT_LIMIT
CUST_SALES_REP_NUM
tablename is PART
PART_NUMBER
PART_DESCRIPTION
UNITS_ON_HAND
ITEM_CLASS
WAREHOUSE
UNIT_PRICE
tablename is SALES_REP
SLSR_PK
SLSR_LAST
SLSR_FIRST
SLSR_STREET
SLSR_CITY
SLSR_STATE
SLSR_ZIP_CODE
SLSR_TOTAL_COMMISSION
SLSR_COMMISSION_RATE
SELECT ORDR_ORDER_NUMBER, ORDR_ORDER_DATE
FROM ORDER_TABLE
WHERE ORDR_ORDER_NUMBER IN (
SELECT ORLN_ORDER_NUMBER
FROM ORDER_LINE
WHERE ORLN_PART_NUMBER IN (
SELECT PART_NUMBER
FROM PART
WHERE PART_DESCRIPTION = 'iron'
)
)
AND ORDR_CUSTOMER_NUMBER IN (
SELECT CUST_NUMBER
FROM CUSTOMER
WHERE CUST_LAST = 'Nelson' AND CUST_FIRST = 'Mary'
);
above is the command i entered but when i entered it, it told me no data found.
all the tables above show the tables created and their exact data for each table.
please help i have tried everything and still keep getting "no data found". How will the command look like?
Trending now
This is a popular solution!
Step by step
Solved in 4 steps