How would you use SQL to identify the top 10 lessons by completion rate in the last 30 days?
Use the lesson_progress table. Treat each row as one learner's lesson assignment, and calculate completion rate as completed assignments divided by all assignments in the period.
lesson_name, completion_rate, and assignment_count.| Column | Type | Description |
|---|---|---|
| progress_idPK | INT | Unique progress record identifier |
| learner_id | INT | Learner assigned to the lesson |
| lesson_name | VARCHAR(150) | Name of the lesson |
| activity_date | DATE | Date of the learner's lesson activity |
| completed | BOOLEAN | Whether the learner completed the lesson |