Here’s an Oracle version of the same query:
select data.*
, derived_table.position
from data
, (select a.id, sum(nvl(b.length, 0)) position
from data a
, data b
where b.id(+) < a.id
group by a.id
) derived_table
where data.id = derived_table.id
Oracle uses NVL instead of COALESCE, and its own join syntax instead of ANSI-92 joins, but the concepts are the same.

