Commit be751791 by 阳浪

4.24bug优化

parent 7157974e
......@@ -316,8 +316,8 @@
SELECT ex.id,ex.visible_range as visibleRange,
(select count(1) from tr_exam_authorize where exam_id = ex.id and state =1) as shouldExamNum,
(SELECT COUNT(DISTINCT account_id) FROM tr_exam_answer WHERE exam_id = ex.id AND state in(1,2)) as commitExamNum,
(select COUNT(distinct account_id) from tr_exam_answer where state=2 AND exam_id = ex.id AND score >= ex.qualified_score group by account_id having count(1)>1) as qualifidNum,
(select COUNT(distinct account_id) from tr_exam_answer where state=2 AND exam_id = ex.id AND score >= ex.qualified_score group by account_id having count(1)=1) as qualifiedNumFrist
(select COUNT(distinct account_id) from tr_exam_answer where state=2 AND exam_id = ex.id AND score >= ex.qualified_score) as qualifidNum,
(select COUNT(distinct account_id) from tr_exam_answer where state=2 AND exam_id = ex.id AND score >= ex.qualified_score ) as qualifiedNumFrist
FROM exam ex
WHERE ex.state>1 and ex.company_id = #{companyId} and ex.site_id = #{siteId}
and DATE_FORMAT(ex.create_time,'%Y') = #{year}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment