--create table temp as select * from result where systemvalidsince in (to_date('31.03.2015','DD.MM.YYYY'),to_date('30.03.2015','DD.MM.YYYY'))
--create table temp as select * from result where systemvalidsince in (to_date('30.06.2015','DD.MM.YYYY'),to_date('29.06.2015','DD.MM.YYYY'))
--create table temp as select * from result where systemvalidsince in (to_date('30.09.2015','DD.MM.YYYY'),to_date('29.09.2015','DD.MM.YYYY'))
create table temp as select * from result where systemvalidsince in (to_date('31.12.2015','DD.MM.YYYY'),to_date('30.12.2015','DD.MM.YYYY'))
--(to_date('28.02.2015','DD.MM.YYYY'),to_date('27.02.2015','DD.MM.YYYY'))
-->= (select max(prev_date) from time t)
--select * from time t
;
--drop table result;
;
ALTER TABLE temp
  RENAME TO result;
;
--delete from result where systemvalidsince < (select max(prev_date) from time t)
;
select count(*) from result where 1=1;