select * from ( select first_name, last_name, salary, nvl(versions_starttime, to_date( '1', 'YYYY')) as start_time, nvl(versions_endtime, sysdate) as end_time from accountants versions between scn minvalue and maxvalue ) where start_time < to_date('20071119-2000', 'YYYYMMDD-hh24mi') order by start_time