–save the whole sum into a variable
summa = select sum(val) from sometable;
select * from sometable o where ( select sum(val)from sometable i where i.val <= o.val ) >= 0.6*summa;
欢迎分享,转载请注明来源:内存溢出
–save the whole sum into a variable
summa = select sum(val) from sometable;
select * from sometable o where ( select sum(val)from sometable i where i.val <= o.val ) >= 0.6*summa;
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)