Please provide an answer in MYSQL workbench /* For each order where the customer
ID: 3726872 • Letter: P
Question
Please provide an answer in MYSQL workbench
/* For each order where the customer is not using a Visa credit card list the order_id, product_id, and quantity stored in the order_items table – use a subquery. */
orders table :
Columns:
order_items table :
Columns:
int(11)
order_id int(11) AI PK customer_id int(11) order_date datetime ship_amount decimal(10,2) tax_amount decimal(10,2) ship_date datetime ship_address_id int(11) card_type varchar(50) card_number char(16) card_expires char(7) billing_address_id int(11Explanation / Answer
SELECT order_items.order_id, order_items.product_id,
order_items.quantity FROM order_items
WHERE order_items.order_id = (SELECT order_id FROM orders
WHERE card_type != "visa credit card");
**Comment for any further queries.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.