日期:2014-05-16 浏览次数:20529 次
WITH cte
AS ( SELECT b.max_2014 ,
a.index_id ,
b.min_2014 ,
b.exam_sort ,
b.variation_char,
POWER(ABS(( a.ori_value - b.min_2014 ) / ( b.max_2014
- b.min_2014 )),
1.4) * 40 + 60 AS iscontr2
FROM court_stat a
INNER JOIN range_rule b ON a.index_id = b.index_id
)
with cte as
(select b.max_2014,
a.index_id,
b.min_2014,
b.exam_sort,
b.variation_char,
power(abs((a.ori_value-b.min_2014)/( b.max_2014-b.min_2014)),1.4)*40+60 'iscontr2'
from (select distinct index_id,ori_value from court_stat) a
inner join range_rule b on a.index_id = b.index_id
)
select * from cte