SELECT
sum(decode(WAT.DR_CR_FLAG,'CR',1,0)) CR_AMOUNT,
sum(decode(WAT.DR_CR_FLAG,'DR',1,0)) DR_AMOUNT,
sum(decode(WAT.DR_CR_FLAG,'CR',WAT.DR_CR_AMOUNT,0)) DR_CR_AMOUNT,
sum(decode(WAT.DR_CR_FLAG,'DR',WAT.DR_CR_AMOUNT,0)) ACCOUNT_AMOUNT
FROM T_ACCOUNT_WATER WAT
WHERE/* WAT.ACCOUNT_NO ='1029359559168890'
AND*/ WAT.CREATE_TIME >=to_date('2015-11-11','yyyy-mm-dd')
AND WAT.CREATE_TIME < to_date('2015-11-11','yyyy-MM-dd')+1
sum(decode(WAT.DR_CR_FLAG,'CR',1,0)) CR_AMOUNT,
sum(decode(WAT.DR_CR_FLAG,'DR',1,0)) DR_AMOUNT,
sum(decode(WAT.DR_CR_FLAG,'CR',WAT.DR_CR_AMOUNT,0)) DR_CR_AMOUNT,
sum(decode(WAT.DR_CR_FLAG,'DR',WAT.DR_CR_AMOUNT,0)) ACCOUNT_AMOUNT
FROM T_ACCOUNT_WATER WAT
WHERE/* WAT.ACCOUNT_NO ='1029359559168890'
AND*/ WAT.CREATE_TIME >=to_date('2015-11-11','yyyy-mm-dd')
AND WAT.CREATE_TIME < to_date('2015-11-11','yyyy-MM-dd')+1