ExamGecko
Question list
Search
Search

Question 21 - DS0-001 discussion

Report
Export

A business analyst is using a client table and an invoice table to create a database view that shows clients who have not made purchases yet. Which of the following joins is most appropriate for the analyst to use to create this database view?

A.
INNER JOIN ON Client.Key = Invoice.Key
Answers
A.
INNER JOIN ON Client.Key = Invoice.Key
B.
RIGHT JOIN ON Client.Key = Invoice.Key WHERE BY Client.Key IS NOLL
Answers
B.
RIGHT JOIN ON Client.Key = Invoice.Key WHERE BY Client.Key IS NOLL
C.
LEFT JOIN ON Client.Key = Invoice.Key
Answers
C.
LEFT JOIN ON Client.Key = Invoice.Key
D.
LEFT JOIN ON Client.Key = Invoice.Key WHERE BY Invoice.Key IS NOLL
Answers
D.
LEFT JOIN ON Client.Key = Invoice.Key WHERE BY Invoice.Key IS NOLL
Suggested answer: D

Explanation:

The join that is most appropriate for the analyst to use to create this database view is option D. This join uses theLEFT JOINclause to combine theclienttable and theinvoicetable based on the matching values in theKeycolumn. TheWHEREclause filters out the rows where theInvoice.Keycolumn is not null, meaning that the client has made a purchase. The result is a view that shows only the clients who have not made any purchases yet. The other options either do not produce the desired result or have syntax errors. For example, option A would show only the clients who have made purchases, option B would show only the invoices that do not have a matching client, and option C would show all the clients regardless of their purchase status.Reference:CompTIA DataSys+ Course Outline, Domain 1.0 Database Fundamentals, Objective 1.2 Given a scenario, execute database tasks using scripting and programming languages.

asked 02/10/2024
Fabio Morais Melo
37 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first