Practice Set 2
Accenture Success Primer ExammediumMay 2026 DumpsDatabase Queries

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

Quick AnswerThe correct answer is 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); because it directly addresses the core logic of Practice Set 2.

Uses a correlated subquery to identify customers with multiple entries in the Orders table.

Related Accenture Practice Set 2 questions

Practice more Accenture Practice Set 2 questions

PrimerPrep has 1400+ practice questions, 2026 simulations and coding hands-on — all free.

Watch Walkthroughs!