CompTIA DataX (DY0-001) — Question 37

A data scientist is merging two tables. Table 1 contains employee IDs and roles. Table 2 contains employee IDs and team assignments. Which of the following is the best technique to combine these data sets?

Answer options

Correct answer: A

Explanation

The INNER JOIN is the best choice here because it combines rows from both tables where there is a match in employee IDs, ensuring that only employees with both roles and team assignments are included. The LEFT JOIN would include all records from Table 1, even if there were no corresponding team assignments, while the RIGHT JOIN would do the opposite, and the OUTER JOIN would include all records from both tables, which may not be necessary in this case.