Interview practice question
Average looks too high
Data Engineering · SQL · Beginner
A manager says the average discount in your report looks too high. You find many orders have NULL discount. What's going on?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- AVG ignores NULLs, so only orders with a discount are averaged.
- If NULL means no discount, it should count as zero.
- Use AVG(COALESCE(discount, 0)).
- Confirm with the business what NULL means.
- Fix at the source or staging layer.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.