You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, our student_lesson view does not know if a student was supposed to be present in the lesson or no because it only knows the current group_id of a student.
To fix this we need to consult the enrollments table. Enrollments tell us when the student has joined or left particular group.
Student_lessons should only exist for students while they were active in a particular group.
If a student joined the group 7 days ago, they should have student_lessons for all lessons in the last 7 days, but none for lessons that happened before in that group.
This will require some tinkering with SQL. I suspect this will make the query MUCH less performant but the next step will be to materialize it and setup a refresh schedule
The text was updated successfully, but these errors were encountered:
At the moment, our student_lesson view does not know if a student was supposed to be present in the lesson or no because it only knows the current
group_id
of a student.To fix this we need to consult the
enrollments
table. Enrollments tell us when the student has joined or left particular group.Student_lessons should only exist for students while they were active in a particular group.
If a student joined the group 7 days ago, they should have student_lessons for all lessons in the last 7 days, but none for lessons that happened before in that group.
This will require some tinkering with SQL. I suspect this will make the query MUCH less performant but the next step will be to materialize it and setup a refresh schedule
The text was updated successfully, but these errors were encountered: