select c.*,round((datanow-databefore)/databefore,2)*100||'%' datapercent from (select a.auth_tztype ,a.datanow,b.databefore from
(select auth_tztype,Count(auth_tztype)datanow from t_author where auth_applydate between to_date('2011/1/1','yyyy/mm/dd hh24:mi:ss')and to_date('2011/12/31','yyyy/mm/dd hh24:mi:ss') group by auth_tztype )a
 left join (select auth_tztype,Count(auth_tztype)databefore from t_author where auth_applydate between to_date('2010/1/1','yyyy/mm/dd hh24:mi:ss')and to_date('2010/12/31','yyyy/mm/dd hh24:mi:ss') group by auth_tztype  ) b on a.auth_tztype=b.auth_tztype)c

 

红色为求百分比函数
 

相关文章:

  • 2021-12-30
  • 2022-01-23
  • 2022-12-23
  • 2021-05-14
  • 2021-06-19
  • 2021-06-20
  • 2021-04-01
  • 2021-04-13
猜你喜欢
  • 2021-12-11
  • 2021-09-29
  • 2021-10-14
  • 2021-09-24
  • 2021-06-24
  • 2021-07-27
  • 2021-05-20
相关资源
相似解决方案