DA0-002 · Question #121
A data analyst is gathering data from multiple tables in a database. The analyst needs certain columns from each table. Which of the following is the best method to accomplish this task?
The correct answer is D. Join. To combine specific columns from multiple tables in a database, the best method is to use a JOIN operation.
Question
A data analyst is gathering data from multiple tables in a database. The analyst needs certain columns from each table. Which of the following is the best method to accomplish this task?
Options
- AAggregate
- BUnion
- CNest
- DJoin
How the community answered
(35 responses)- B6% (2)
- C3% (1)
- D91% (32)
Why each option
To combine specific columns from multiple tables in a database, the best method is to use a JOIN operation.
Aggregation summarizes data (e.g., sum, average, count) within a single table or grouped data, but does not combine columns from separate tables.
UNION combines rows from two or more tables with compatible column structures, appending them vertically, rather than joining them horizontally based on common keys to select specific columns.
Nesting usually refers to hierarchical data structures or embedding one query within another, which is not the primary method for combining columns from distinct tables.
A JOIN operation combines rows from two or more tables based on a related column between them, allowing a data analyst to select specific columns from each table to create a consolidated view. This is fundamental for relational database querying when data from different tables needs to be linked.
Concept tested: SQL JOIN operations
Source: https://learn.microsoft.com/en-us/sql/relational-databases/tables/join-tables
Topics
Community Discussion
No community discussion yet for this question.