return jdbcTemplate.query(
"select * from( select reason, count(*), sum(bonus) from del_info where deldate>CURRENT_TIMESTAMP-'1 day'::interval and bonus is not null group by reason) as s where sum!=0 order by reason",
new RowMapper<DeleteInfoStat>() {
@Override
public DeleteInfoStat mapRow(ResultSet rs, int rowNum) throws SQLException {
return new DeleteInfoStat(rs.getString("reason"), rs.getInt("count"), rs.getInt("sum"));
}
}
);
}