May 2026 Primers
Accenture Mock 2026mediumMay 2026 PrimersJoins

Create a query that joins the customers and orders tables, with the customer's age being less than 25 and the order_id ranging between 2 and 4.

Answer options

A
select o.order_id,item,country from orders o join customers c where o.order_id between 2 and 4 and age <25;
B
select o.order_id,item,country from orders o join customers c on o.customer_id=c.customer_id where o.order_id between 2 and 4 and age <25;
C
select o.order_id,item,country from orders o,customers c where o.order_id in 2,4 and age <25;

Correct answer: select o.order_id,item,country from orders o join customers c on o.customer_id=c.customer_id where o.order_id between 2 and 4 and age <25;

Explanation

The correct query joins orders and customers using customer_id, then filters order_id between 2 and 4 and age less than 25.

Related Accenture May 2026 Primers questions

Practice more Accenture May 2026 Primers questions

PrimerDumps has 1400+ primer questions, 2026 mocks and coding hands-on — all free.