main
黄海 2 years ago
parent 4a33d700de
commit 42d8e84b1c

@ -1,11 +1,12 @@
#namespace("Exam")
#sql("getPageSummary")
select t1.person_id,t2.person_name,t2.ks,t2.tel,sum(t1.score) as score,t2.start_time,t2.end_time
select t1.person_id,t2.person_name,t2.ks,t2.tel,sum(if(t1.reply=t1.answer,t1.score,0)) as score,t2.start_time,t2.end_time
from t_exam_record as t1
inner join t_exam_person as t2 on t1.person_id=t2.person_id
where t1.reply=t1.answer and t2.end_time is not null and t1.b_use=1 and t2.b_use=1
where t2.end_time is not null and t1.b_use=1 and t2.b_use=1
group by t1.person_id,t2.person_name,t2.ks,t2.tel,t2.start_time,t2.end_time
order by sum(t1.score) desc
order by sum(if(t1.reply=t1.answer,t1.score,0)) desc,EXTRACT(epoch FROM CAST( t2.end_time AS TIMESTAMP))-EXTRACT(epoch FROM
CAST( t2.start_time AS TIMESTAMP)) asc
#end
#sql("getPersonAllInfoAfterJiaoJuan")

@ -1,11 +1,12 @@
#namespace("Exam")
#sql("getPageSummary")
select t1.person_id,t2.person_name,t2.ks,t2.tel,sum(t1.score) as score,t2.start_time,t2.end_time
select t1.person_id,t2.person_name,t2.ks,t2.tel,sum(if(t1.reply=t1.answer,t1.score,0)) as score,t2.start_time,t2.end_time
from t_exam_record as t1
inner join t_exam_person as t2 on t1.person_id=t2.person_id
where t1.reply=t1.answer and t2.end_time is not null and t1.b_use=1 and t2.b_use=1
where t2.end_time is not null and t1.b_use=1 and t2.b_use=1
group by t1.person_id,t2.person_name,t2.ks,t2.tel,t2.start_time,t2.end_time
order by sum(t1.score) desc
order by sum(if(t1.reply=t1.answer,t1.score,0)) desc,EXTRACT(epoch FROM CAST( t2.end_time AS TIMESTAMP))-EXTRACT(epoch FROM
CAST( t2.start_time AS TIMESTAMP)) asc
#end
#sql("getPersonAllInfoAfterJiaoJuan")

Loading…
Cancel
Save