一个sql查询

select a.* from qz_special_paper a
where a.specialpaperID in (
select  top 3 specialpaperID
from qz_special_paper
where areaID='110111' and a.courseID=courseID
order by courseID, sequence desc
) order by courseID, sequence desc

你可能感兴趣的:(sql)