SQLSTATE [42S22]: Column not found: 1054 Unknown column 'video_trackers.updated_at' in 'on clause' (
    SQL:
    select
        `students`.`id`,
        `students`.`teacher_id`,
        CONCAT(users.fname, ' ', users.lname) AS studentName,
        CONCAT(users.lname, ' ', users.fname) AS sName,
        `classes`.`name` as `class`,
        `classes`.`id` as `class_id`,
        `last_logged_in`,
        `total_minuts_watched`,
        `tot_watch_time`,
        `tot_video_duration`,
        `video_watched_count`,
        `q_answered_count`,
        `q_mark`
    from
        `students`
        inner join `users` on `users`.`id` = `students`.`user_id`
        left join `classes` on `classes`.`id` = `students`.`class_id`
        left join `task_completed` on `task_completed`.`student_id` = `students`.`id`
        left join `tasks` on `tasks`.`id` = `task_completed`.`task_id`
        left join (
            SELECT
                `video_trackers`.`student_id`,
                ROUND(SUM(watched_time) / 60000) as total_minuts_watched
            from
                `video_trackers`
                inner join `videos` on `video_trackers`.`video_id` = `videos`.`id`
                inner join `students` on `students`.`id` = `video_trackers`.`student_id`
                and `videos`.`curriculum_id` = `students`.`curriculum_id`
            group by
                `video_trackers`.`student_id`
        ) as watched_videos on `watched_videos`.`student_id` = `students`.`id`
        and `video_trackers`.`updated_at` > 2022 -05 -24 00 :00 :00
        and `video_trackers`.`updated_at` < 2022 -06 -23 23 :59 :59
        left join (
            SELECT
                `video_trackers`.`student_id`,
                SUM(watched_time) as tot_watch_time,
                SUM(video_duration) as tot_video_duration,
                watch_percentage
            from
                `video_trackers`
                inner join `videos` on `video_trackers`.`video_id` = `videos`.`id`
                inner join `students` on `students`.`id` = `video_trackers`.`student_id`
                and `videos`.`curriculum_id` = `students`.`curriculum_id`
            where
                watch_percentage >= 5
                AND video_trackers.updated_at > '2022-05-24 00:00:00'
                AND video_trackers.updated_at < '2022-06-23 23:59:59'
            group by
                `video_trackers`.`student_id`
        ) as avg_watched_videos on `avg_watched_videos`.`student_id` = `students`.`id`
        left join (
            SELECT
                `video_trackers`.`student_id`,
                COUNT(`video_trackers`.`id`) as video_watched_count,
                watch_percentage
            from
                `video_trackers`
                inner join `videos` on `video_trackers`.`video_id` = `videos`.`id`
                inner join `students` on `students`.`id` = `video_trackers`.`student_id`
                and `videos`.`curriculum_id` = `students`.`curriculum_id`
            where
                watch_percentage >= 70
                AND video_trackers.updated_at > '2022-05-24 00:00:00'
                AND video_trackers.updated_at < '2022-06-23 23:59:59'
            group by
                `video_trackers`.`student_id`
        ) as watched_counts on `watched_counts`.`student_id` = `students`.`id`
        left join (
            SELECT
                `student_unitwise_points`.`student_id`,
                sum(student_unitwise_points.questions_attempted) as q_answered_count,
                sum(student_unitwise_points.points) as q_mark
            from
                `student_unitwise_points`
                inner join `students` on `students`.`id` = `student_unitwise_points`.`student_id`
                and `student_unitwise_points`.`curriculum_id` = `students`.`curriculum_id`
            WHERE
                student_unitwise_points.created_at > '2022-05-24 00:00:00'
                AND student_unitwise_points.created_at < '2022-06-23 23:59:59'
            group by
                `student_unitwise_points`.`student_id`
        ) as quiz_answered on `quiz_answered`.`student_id` = `students`.`id`
    where
        `students`.`school_id` = 3
        and `students`.`deleted_at` is null
    group by
        `students`.`id`
)