nerdexam
CompTIA

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.

Data Acquisition and Preparation

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)
  • B
    6% (2)
  • C
    3% (1)
  • D
    91% (32)

Why each option

To combine specific columns from multiple tables in a database, the best method is to use a JOIN operation.

AAggregate

Aggregation summarizes data (e.g., sum, average, count) within a single table or grouped data, but does not combine columns from separate tables.

BUnion

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.

CNest

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.

DJoinCorrect

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

#SQL Joins#Relational Databases#Data Querying#Data Integration

Community Discussion

No community discussion yet for this question.

Full DA0-002 Practice