Certified Data Engineer Associate Exam QuestionsBrowse all questions from this exam

Certified Data Engineer Associate Exam - Question 105


A data engineer is working with two tables. Each of these tables is displayed below in its entirety.

The data engineer runs the following query to join these tables together:

Show Answer
Correct Answer: C

The query performs a LEFT JOIN between the 'sales' and 'favorite_stores' tables on the 'customer_id' field. This means all records from the 'sales' table will be included in the result, and where there is no matching record in 'favorite_stores', the result will contain NULL for the 'store_id'. In this case, the 'sales' table contains records with customer IDs 'a1', 'a3', and 'a4'. The 'favorite_stores' table contains records matching 'a1' and 'a4', but not 'a3'. Therefore, the correct result is to include all rows from the 'sales' table and NULL for the unmatched row, which is represented in the option showing 'a3' with a NULL store_id.

Discussion

5 comments
Sign in to comment
vigaroOption: C
Jun 20, 2024

LEFT join. D is the result of a FULL join

b79962eOption: D
May 22, 2024

should be D

PreranaC
May 23, 2024

LEFT JOIN so should be C

b79962eOption: C
May 22, 2024

Sorry wrong it is C for the left join

31cadd7Option: D
Jun 14, 2024

IT'S D

nescafe7Option: C
Jun 19, 2024

C - left outer join