统计分析模块更新,待测试,统计分析模块更新,就业3个模块更新。

This commit is contained in:
Orangeeee
2026-09-22 23:01:21 +08:00
committed by geyuan
parent 75f23e39be
commit ffcb40db41
2 changed files with 26 additions and 51 deletions
+14 -3
View File
@@ -39,12 +39,23 @@ def get_class_count(g , db):
from scores.model.score_model import Score
def get_score_80(db):
q = ( db.query(Score)
.group_by(Score.score)
.having( min(Score.score) >= 80)
sq = ( db.query(Students.id)
.join(Score, Score.sid == Students.id)
.filer(Score.score < 80 )
.group_by(Students.id)
.having(func.count(Score.id) > 2 )
.sq()
)
q = ( db.query(Students.name,ClassInfo.name,Score.score )
.join(ClassInfo, ClassInfo.id == Students.class_id)
.join(Score, Score.sid == Students.id)
.filer(Students.id.in_(sq),Score.score < 80)
.all()
)
return q