Skip to content

Commit

Permalink
refactor: fix calculation on be (#2474)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlreadyBored authored May 8, 2024
1 parent 381fb27 commit 1305cfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nestjs/src/courses/stats/course-stats.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class CourseStatsService {
'students_with_certificate',
)
.addSelect(
`COUNT(CASE WHEN student.totalScore >= (${maxScore} * course.certificateThreshold / 100) THEN 1 END)`,
`COUNT(CASE WHEN student.isExpelled = false AND student.totalScore >= (${maxScore} * course.certificateThreshold / 100) THEN 1 END)`,
'eligible_for_certification',
)
.where('student.courseId = :courseId', { courseId });
Expand Down

0 comments on commit 1305cfa

Please sign in to comment.