Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Certified Data Analyst Associate All Questions

View all questions & answers for the Certified Data Analyst Associate exam

Exam Certified Data Analyst Associate topic 1 question 27 discussion

Actual exam question from Databricks's Certified Data Analyst Associate
Question #: 27
Topic #: 1
[All Certified Data Analyst Associate Questions]

Consider the following two statements:
Statement 1:

Statement 2:

Which of the following describes how the result sets will differ for each statement when they are run in Databricks SQL?

  • A. The first statement will return all data from the customers table and matching data from the orders table. The second statement will return all data from the orders table and matching data from the customers table. Any missing data will be filled in with NULL.
  • B. When the first statement is run, only rows from the customers table that have at least one match with the orders table on customer_id will be returned. When the second statement is run, only those rows in the customers table that do not have at least one match with the orders table on customer_id will be returned.
  • C. There is no difference between the result sets for both statements.
  • D. Both statements will fail because Databricks SQL does not support those join types.
  • E. When the first statement is run, all rows from the customers table will be returned and only the customer_id from the orders table will be returned. When the second statement is run, only those rows in the customers table that do not have at least one match with the orders table on customer_id will be returned.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
MrWood47
Highly Voted 10 months ago
Selected Answer: B
Statement 1 uses a LEFT SEMI JOIN. This type of join returns all rows from the left table (customers) where there is at least one matching row in the right table (orders). It does not return any columns from the right table; it only checks for the existence of a match. Statement 2 uses a LEFT ANTI JOIN. This join returns all rows from the left table (customers) for which there is no matching row in the right table (orders). So, the result of Statement 1 will be all customer records that have made at least one order, and the result of Statement 2 will be all customer records that have not made any orders.
upvoted 6 times
...
barmand
Most Recent 4 months, 1 week ago
B is the correct Answer
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...