oracle的数据库,随笔
不多说,看代码
select b.*,a.kscj,a.paiming from (select t.kch,t.kcm,t.kscj,t.xh,
rank() over (order by t.kscj desc) paiming //排名用的
from CJ_LRCJB t where t.kch=#{kch}
order by kscj desc) a,(select t.kch,t.kcm,count(kscj) as total,max(kscj) as max_score,min(kscj) as min_score from (select
t.kch,t.kcm,t.kscj from CJ_LRCJB t where t.kch=#{kch}
order by kscj desc) t
group by t.kch,t.kcm) b where a.kch=b.kch and a.kcm=b.kcm and xh=#{xh}
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。