select SYSDATE,
to_date(to_char(add_months(TRUNC(SYSDATE, 'Q'), -0), 'yyyy-mm-dd')||' 00:00:00','yyyy-mm-dd hh24:mi:ss')
as 当前季度开始,
to_date(to_char(add_months(TRUNC(SYSDATE, 'Q'), -3), 'yyyy-mm-dd')||' 00:00:00','yyyy-mm-dd hh24:mi:ss')
as 当前季度结束,
to_date(to_char(add_months(TRUNC(SYSDATE, 'Q'), -3), 'yyyy-mm-dd')||' 00:00:00','yyyy-mm-dd hh24:mi:ss')
as 上个季度开始,
to_date(to_char(add_months(TRUNC(SYSDATE, 'Q'), -6), 'yyyy-mm-dd')||' 00:00:00','yyyy-mm-dd hh24:mi:ss')
as 上个季度结束,
to_date(to_char(add_months(TRUNC(SYSDATE, 'Q'), -6), 'yyyy-mm-dd')||' 00:00:00','yyyy-mm-dd hh24:mi:ss')
as 上上个季度开始,
to_date(to_char(add_months(TRUNC(SYSDATE, 'Q'), -9), 'yyyy-mm-dd')||' 00:00:00','yyyy-mm-dd hh24:mi:ss')
as 上上个季度结束
from 表名;