oracel

统计百分比:

select sum(t1.reward_money) as reward_money,

      t1.kpi_code,

      RATIO_TO_REPORT(sum(t1.reward_money)) OVER() AS REWARD_PERCENT

  from t1

group by t1.kpi_code;


oracle获取特定字符串在字符串中出现的次数:

select regexp_count('abacdefg', 'a') from dual;

你可能感兴趣的:(oracel)