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.
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
Options
- A73.5
- B76.5
- C78.8
- D81.5
How the community answered
(37 responses)- A3% (1)
- B5% (2)
- C81% (30)
- D11% (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.
This value would result from a different set of OrderQuantity values or an incorrect calculation after the join.
This value would result from a different set of OrderQuantity values or an incorrect calculation after the join.
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.
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
Community Discussion
No community discussion yet for this question.
