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

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(11

Explanation / 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.

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