--分组排序
select row_number() over(partition by C order by E DESC) no,a,b,c,d,e  
from t1
 
--将分组排序的查询当作一张表查询,需要按照上面排序,可以自己修改,这里处理为所描述的降序,根据no判断,小于等于5的就是需要的数据
 select *  
from (
select row_number() over(partition by C order by E DESC) no,a,b,c,d,e  
from t1
) a  
where a.no <= 5