Which query will delete the records of customers who ordered more than one item?
Answer options
A
delete from customers where exists (select customer_id from orders where customers.customer_id=orders.customer_id group by customer_id having count(order_id)>1);
B
delete from orders where count(order_id)>1;
C
delete from customers where not exists (...)
D
delete from customers where exists (... group by customer_id)
Correct answer: delete from customers where exists (select customer_id from orders where customers.customer_id=orders.customer_id group by customer_id having count(order_id)>1);
Explanation
Uses a correlated subquery to identify customers with multiple entries in the Orders table.