Oracle多字段统计大于某值的sql写法

合在一起的写法

select (select count(h2s) from T_RECEIVE_DATA where h2s>0 ) as h2s,(select count(stench) from T_RECEIVE_DATA where stench>0 )  as stench ,(select count(nh3) from T_RECEIVE_DATA where nh3>0 )   as nh3  from  dual

分开三个写法
select count(h2s) as h2s from T_RECEIVE_DATA where h2s>0 

select count(stench)  as stench from T_RECEIVE_DATA where stench>0 

select count(nh3)  as nh3  from T_RECEIVE_DATA where nh3>0

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-30
  • 2022-02-12
  • 2022-12-23
  • 2022-12-23
  • 2021-06-30
猜你喜欢
  • 2022-12-23
  • 2021-04-29
  • 2021-12-02
  • 2022-12-23
  • 2022-01-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案