摘要:
Oracle分组函数小结1.OVER (PARTITION BY ..)例:select a,b,c, sum(c) OVER (PARTITION BY b) sum_c对 b列值相同的行进行c值的累计.-- 检索指定的零售户类型个数所占的百分比select t2.*,round(t2.cust_count/t2.cust_count_all,3)*100 as count_percent from( select t.*, sum(cust_count) over (partition by t.regie_org_code,t.analysis_month) as cust_count_ 阅读全文