問題文
An analyst reports that the average order value for a region is higher than expected. Investigation shows that a quarter of the rows have a null discount_amount, and the reported figure uses AVG on that column. What does the null handling mean for the figure?
選択肢
- The nulls are treated as zero, which lowers the average for the whole region and for the quarter because the divisor still counts every row.
- The average returns null for the whole region and for the quarter because any null in the input propagates to the aggregate result.
- The average is computed over the rows that hold a value, so the rows with nulls are excluded from both the sum and the divisor.
- The average is computed twice, once including and once excluding nulls, and the larger of the two is returned, and the choice is not configurable.