Direi che stai già acquisendo tutte le metriche di cui hai bisogno, poiché la durata può essere derivata dai dati esistenti. Potresti creare una vista:
create or replace view vw_doc_timeline as
select t.doc_entry_id, t.doc_id, t.doc_status, t.doc_date
, case when doc_status = 'Published' then 0
else lead(doc_date) over (partition by doc_id order by doc_entry_id)
- doc_date
end as duration
from tbl_doc_timeline t;
Quindi:
SQL> select * from vw_doc_timeline;
DOC_ENTRY_ID DOC_ID DOC_STATUS DOC_DATE DURATION
------------ ---------- ------------------------------ --------- ----------
1 123 Planned 05-JUN-12 10
7 123 Draft 15-JUN-12 5
38 123 Approval 20-JUN-12 10
102 123 Published 30-JUN-12 0