Interview practice question
Conversion rate shows as zero
Data Analyst · SQL for Analytics · Beginner
Your query calculating conversion rate as orders / visits returns 0 for every row. Why?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Integer division truncates.
- Cast to decimal/float.
- Multiply by 100.0.
- NULLIF to avoid divide-by-zero.
- Round for display.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.