select
sum( case when (t.beg_dt<='20150401' and t.end_dt>'20150401') then t.ac_bal else 0 end ) d1,
sum( case when (t.beg_dt<='20150402' and t.end_dt>'20150402') then t.ac_bal else 0 end ) d2,
sum( case when (t.beg_dt<='20150403' and t.end_dt>'20150403') then t.ac_bal else 0 end ) d3
from FNTACCBALHIS t where t.bal_typ=0 and chk_typ='1' and t.end_dt>'20150401' and t.beg_dt<='20150403'
group by t.inn_ac_no

相关文章:

  • 2021-07-09
  • 2022-01-01
  • 2021-11-23
  • 2021-12-10
  • 2021-11-25
猜你喜欢
  • 2022-01-01
  • 2021-07-20
  • 2022-12-23
  • 2022-01-19
  • 2022-01-07
  • 2022-01-01
  • 2022-12-23
相关资源
相似解决方案