Medium1 markMultiple Choice
CPA · Question 29 · Area I: Information Systems
A developer is writing a SQL query to combine customer data from the 'Sales' table and the 'Support' table. They want to see ALL customers from the 'Sales' table, and matching support tickets if they exist. If a customer has no support tickets, they should still appear in the list. Which JOIN type should be used?
A developer is writing a SQL query to combine customer data from the 'Sales' table and the 'Support' table. They want to see ALL customers from the 'Sales' table, and matching support tickets if they exist. If a customer has no support tickets, they should still appear in the list. Which JOIN type should be used?
Answer options:
A.
INNER JOIN
B.
RIGHT JOIN
C.
LEFT JOIN
D.
CROSS JOIN
How to approach this question
Visualize the tables. Left = Sales. Right = Support. You want everything from the Left.
Full Answer
C.LEFT JOIN✓ Correct
C
A LEFT JOIN returns all records from the left table (Sales), and the matched records from the right table (Support). The result is NULL from the right side if there is no match.
Common mistakes
Using INNER JOIN (which would exclude customers with no tickets).
Practice the full CPA ISC Practice Exam 3
82 questions · hints · full answers · grading
More questions from this exam
Q01A CPA is advising a client who is migrating their legacy on-premise ERP system to a cloud-based s...MediumQ02During a review of a client's cloud governance structure, an auditor notes that the client uses a...MediumQ03An auditor is evaluating the 'Processing Integrity' principle for a financial institution's loan ...HardQ04A company uses a batch processing system to update inventory records overnight. The 'Grandfather-...HardQ05During a walkthrough of the change management process, an auditor observes that the 'Developer' r...Medium
Expert