with t as (
select '2021-01-02' dt from dual union all
select '2021-01-07' dt from dual union all
select '2021-01-03' dt from dual union all
select '2021-01-04' dt from dual union all
select '2021-01-05' dt from dual union all
select '2021-01-06' dt from dual union all
select '2021-01-01' dt from dual union all
select '2021-01-08' dt from dual
)
select
dt ,ceil(rownum/2)
from (
select
dt
from t
order by dt
)