日期:2014-05-17 浏览次数:20467 次
select name from STUDENT where id in (select studentid from EXAM where score in
(SELECT score FROM EXAM
WHERE lessonid='10004' group by score having score <=
(select avg(score) from EXAM where Lessonid ='10004') )and lessonid ='10004')
SELECT name
FROM STUDENT
WHERE id IN ( SELECT studentid
FROM EXAM
WHERE lessonid = '10004'
AND score <= ( SELECT AVG(score)
FROM EXAM
WHERE Lessonid = '10004'
) )