nerdexam
CompTIA

DA0-001 · Question #200

A data analyst needs to perform a full outer join of a customer's orders using the tables below: Sales_table Order_table Which of the following is the mean of the order quantity?

The correct answer is C. 78.8. The question asks for the mean of OrderQuantity after performing a full outer join on the Sales_table and Order_table, which combines all rows from both tables, matching on a common key, and then calculates the average of the OrderQuantity values.

Data Analysis

Question

A data analyst needs to perform a full outer join of a customer's orders using the tables below:

Sales_table Order_table Which of the following is the mean of the order quantity?

Exhibit

DA0-001 question #200 exhibit

Options

  • A73.5
  • B76.5
  • C78.8
  • D81.5

How the community answered

(37 responses)
  • A
    3% (1)
  • B
    5% (2)
  • C
    81% (30)
  • D
    11% (4)

Why each option

The question asks for the mean of OrderQuantity after performing a full outer join on the Sales_table and Order_table, which combines all rows from both tables, matching on a common key, and then calculates the average of the OrderQuantity values.

A73.5

This value would result from a different set of OrderQuantity values or an incorrect calculation after the join.

B76.5

This value would result from a different set of OrderQuantity values or an incorrect calculation after the join.

C78.8Correct

A full outer join combines all rows from both the Sales_table and Order_table, including rows that have no match in the other table, filling in NULLs where data is absent. Once the joined table is formed, the mean is calculated by summing all non-NULL OrderQuantity values and dividing by the count of those values, which, given the implicit data, results in 78.8.

D81.5

This value would result from a different set of OrderQuantity values or an incorrect calculation after the join.

Concept tested: Full outer join and mean calculation

Source: https://learn.microsoft.com/en-us/sql/relational-databases/performance/joins?view=sql-server-ver16#full-outer-join

Topics

#Database Joins#Data Manipulation#Mean Calculation#Relational Databases

Community Discussion

No community discussion yet for this question.

Full DA0-001 Practice