sum(统计字段名) over(partition by 分组字段1),
sum(统计字段名) over(partition by 分组字段2),
sum(统计字段名) over(partition by 分组字段3),
......
sum(统计字段名) over(partition by 分组字段n)
from t
select xx1,xx2,yy,yy/sum(yy)over() zzfrom(
select xx1,xx2,sum(xx3) as yy
from table_name
group by xx1,xx2
)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)