不连表 就是玩儿
试卷发布当天作答人数和平均分
http://www.nowcoder.com/practice/5b58e89556dc4153a79d8cf8c08ba499
select exam_id,count(distinct uid) as uv,round(avg(score),1) as avg_score
from exam_record
where exam_id in (select exam_id from examination_info where tag = 'SQL')
and uid in (select uid from user_info where level >5)
and date(submit_time) in (select date(release_time) from examination_info where tag = 'SQL')
and submit_time is not NULL
group by exam_id,date(submit_time)
order by uv desc,avg_score asc

