How would you handle missing data before analysis and modeling?
For this SQL exercise, treat a missing score as either a NULL score or an absent score record. Replace missing scores with the median observed score for the same assessment type, while preserving complete records.
Output
- One row per assignment, ordered by
assignment_id.
- Return
assignment_id, learner_name, assessment_type, original_score, cleaned_score, and was_missing.
was_missing must indicate whether the original score was missing.