diff --git a/web/src/main/resources/sql/jlw/teacherOpenCourseStudentSigninLog.md b/web/src/main/resources/sql/jlw/teacherOpenCourseStudentSigninLog.md index 66c16fc8..54365f2f 100644 --- a/web/src/main/resources/sql/jlw/teacherOpenCourseStudentSigninLog.md +++ b/web/src/main/resources/sql/jlw/teacherOpenCourseStudentSigninLog.md @@ -592,14 +592,12 @@ summary * 签到汇总 SELECT - COUNT( DISTINCT t.teacher_open_course_student_signin_setting_id ) AS total_signin_count, - SUM( CASE t.teacher_open_course_student_signin_log_tag WHEN 10 THEN 1 ELSE 0 END ) AS total_signin_number, - SUM( CASE t.teacher_open_course_student_signin_log_tag WHEN 20 THEN 1 ELSE 0 END ) AS total_un_signin_number, - SUM( CASE t.teacher_open_course_student_signin_log_tag WHEN 10 THEN 1 ELSE 0 END ) / count( 1 ) * 100 AS total_attendance_rate + COUNT( DISTINCT t.teacher_open_course_student_signin_setting_id ) AS total_signin_count, + IFNULL(SUM( CASE t.teacher_open_course_student_signin_log_tag WHEN 10 THEN 1 ELSE 0 END ),0) AS total_signin_number, + IFNULL(SUM( CASE t.teacher_open_course_student_signin_log_tag WHEN 20 THEN 1 ELSE 0 END ),0) AS total_un_signin_number, + IFNULL(SUM( CASE t.teacher_open_course_student_signin_log_tag WHEN 10 THEN 1 ELSE 0 END ) / count( 1 ) * 100,0) AS total_attendance_rate FROM teacher_open_course_student_signin_log t where 1=1 @if(!isEmpty(teacherOpenCourseId)){ and t.teacher_open_course_id =#teacherOpenCourseId# - @} - t.teacher_open_course_schedule_session_snap_status = 1 - \ No newline at end of file + @} \ No newline at end of file