Free CompTIA DA0-002 Actual Exam Questions - Question 15 Discussion
[Data Acquisition and Preparation]
A data analyst needs to create a combined report that includes information from the following two tables: Managers table ID First_name Last_name Job_title 1001 John Doe Manager 1002 Jane Roe Director Non-managers table ID First_name Last_name Job_title 1003 Robert Roe Business Analyst 1004 Jane Doe Sales Representative 1005 John Roe Operations Analyst Which of the following query methods should the analyst use for this task?
C This is definitely a scenario where union fits best since you’re just combining two sets of rows with the exact same columns. Join would be pointless here because there’s no relationship to match on between the two tables—they’re just separate groups that need to be listed together. Group and nested don’t really apply either since those are more for aggregating or subquery stuff, not straightforward combining. So union is the simplest and cleanest way to get all managers and non-managers in one combined report.
This one feels like a clear case for C. Union is designed to combine rows from two tables with the same structure, and since both have matching columns, stacking them makes sense. Joins would only work if we needed to link related data, which isn’t the case here since managers and non-managers are just separate groups. So, C fits best.
C vs B? Since both tables share the same columns, union (C) is simpler to combine all records.
Makes sense that union (C) stacks rows, but I think join (B) wouldn’t fit since there’s no shared key to link these rows. So yeah, union is the right call here.
C imo, union is perfect for stacking rows from tables with the same structure. Join needs related columns to link on, which doesn’t apply here since these are separate employee sets.
B imo, joins can combine related data from both tables if you want detailed info.
Option C makes sense since it stacks rows from both tables.
C imo