Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Question 34 of 66
Free Preview · 66 of 220 · questions 1–66 of 220 are free. Sign up free to sync your progress across devices.
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
- Correct answer : A — `ON shipments.order_id = pricing.order_id AND shipments.warehouse_region = pricing.warehouse_region`, matching on both columns together A . Combining both columns with AND in the ON clause requires each joined row to match on order_id and warehouse_region simultaneously, which is exactly what is needed to avoid pairing an order with the wrong region's cost. B . Filtering with a separate WHERE clause after an order_id-only join can work logically similarly to an AND condition for an inner join, but it still first materializes the incorrect cross-region matches and is not what the ON clause itself was asked to express; the join predicate should carry the multi-key logic directly. C . USING(order_id) only deduplicates and matches the single named column order_id; it does not automatically pull in warehouse_region as part of the match condition, so cross-region mismatches would still occur. D . An OR condition matches rows where either column is equal, which is looser than required and would still produce incorrect matches whenever order_id matches but the region differs.