select sum(dd) from (
select distinct (paixu),(t.jh*sl) dd from mws_02 t where xh in (
select a.xh from mws_01 a where gh=4 and riqi between to_date ('2017-01-01','yyyy-mm-dd')
and to_date ('2017-12-31 23:59:59','yyyy-mm-dd hh24:mi:ss'))
) group by paixu
运算出的是数据是数字, 之后我还想再从运算出的数据中筛选出10-50 之间的数据