делает предположение о том, как выглядят ваши исходные данные. Я попытался решить твою проблему.
with data as (
--here are some example data
select to_date('2019-12-31','yyyy-mm-dd') d ,-1 stock from dual union all
select to_date('2020-01-03','yyyy-mm-dd') d ,1 stock from dual union all
select to_date('2020-01-04','yyyy-mm-dd') d ,2 stock from dual union all
select to_date('2020-01-30','yyyy-mm-dd') d ,3 stock from dual union all
select to_date('2020-02-01','yyyy-mm-dd') d ,2 stock from dual
)
,filt_data as (
select * from data
where d between to_date('2020-01-01','yyyy-mm-dd') and to_date('2020-01-31','yyyy-mm-dd')
)
, min_date as(
select min(d) d from filt_data
)
, max_date as(
select max(d) d from filt_data
)
select (select d from filt_data where d = (select d from min_date)) open_stock_date
,(select stock from filt_data where d = (select d from min_date)) open_stock
,(select d from filt_data where d = (select d from max_date)) close_stock_date
,(select stock from filt_data where d = (select d from max_date)) close_stock
from dual ;