select count(1) from geerunner.cmpt_enroll as a left join gk_cmpt_score_rule_scoreinfo as b on a.cmpt_id=b.cmptId and a.nick_id=b.mark_no where a.cmpt_id=#{cmptId} and a.cmpt_item=#{roadId} and rule_id=#{ruleId} and checkStatus=#{checkStatus} and a.del_flg=0 and b.isDelete=0
select b.id as cmptScoreRuleScoreId,a.member_name as name,a.cmpt_id as cmptId,rule_id as ruleId,b.mark_no as markNo,subsectionscore as subsectionscore,subsectionTime,subsectionMileage as subsectionMileage,checkStatus,cmptPace,updateTime from geerunner.cmpt_enroll as a left join gk_cmpt_score_rule_scoreinfo as b on a.cmpt_id=b.cmptId and a.nick_id=b.mark_no where a.cmpt_id=#{cmptId} and a.cmpt_item=#{roadId} and rule_id=#{ruleId} and checkStatus=#{checkStatus} and a.del_flg=0 and b.isDelete=0 order by updateTime desc limit #{page.offset},#{page.size}
select b.id as cmptScoreRuleScoreId,a.member_name
as name,a.cmpt_id as cmptId,rule_id as ruleId,b.mark_no
as markNo,subsectionscore as subsectionscore,subsectionTime,subsectionMileage a
s subsectionMileage,checkStatus,cmptPace,updateTime,insertTime
from geerunner.cmpt_enroll as a left join gk_cmpt_score_rule_scoreinfo
as b on a.cmpt_id=b.cmptId and a.nick_id=b.mark_no
where a.cmpt_id=#{cmptId} and a.cmpt_item=#{roadId} and rule_id=#{ruleId}
and checkStatus=#{checkStatus} and a.del_flg=0 and b.isDelete=0
order by updateTime desc limit #{page.offset},#{page.size}
count(case when checkStatus=0 then 1 end) as 'Unprocessed',
count(case when checkStatus=1 then 1 end) as 'pass',
count(case when checkStatus=2 then 1 end) as 'nopass' from geerunner.cmpt_enroll as a left join
gk_cmpt_score_rule_scoreinfo as b on a.cmpt_id=b.cmptId and a.nick_id=b.mark_no where a.cmpt_id=#{cmptId} and a.cmpt_item=#{roadId} and rule_id=#{ruleId} and a.del_flg=0 and b.isDelete=0
count(case when checkStatus=2 then 1 end) as 'nopass'
from geerunner.cmpt_enroll as a
left join gk_cmpt_score_rule_scoreinfo as b on a.cmpt_id=b.cmptId and a.nick_id=b.mark_no
where a.cmpt_id=#{cmptId} and a.cmpt_item=#{roadId} and rule_id=#{ruleId} and a.del_flg=0 and b.isDelete=0