select * from T_IM_SaleIssueBill tis
where to_char(tis.fbizdate,'yyyy-MM-dd') <to_char(trunc(last_day(add_months(sysdate, -1))) ,'yyyy-MM-dd')
and to_char(tis.fbizdate,'yyyy-MM-dd') >to_char(trunc(add_months(sysdate, -1), 'month') ,'yyyy-MM-dd')
select
trunc(sysdate, 'month') 本月第一天,
trunc(last_day(sysdate)) 本月最后一天,
trunc(add_months(sysdate, -1), 'month') 上月第一天,
trunc(last_day(add_months(sysdate, -1))) 上月最后一天,
trunc(add_months(sysdate, -12), 'month') 去年本月第一天,
trunc(last_day(add_months(sysdate, -12))) 去年本月最后一天
from dual