Как насчет этого? Следуйте комментариям в коде. Образцы данных взяты из строк с 1 по 22, поэтому код, который вам нужен, начинается со строки № 23.
SQL> with
2 -- sample data
3 table_a(id, created_date, product) as
4 (select 'aa', to_date('19.05.2017 02:00', 'dd.mm.yyyy hh24:mi'), 'phone' from dual union all
5 select 'bb', to_date('19.05.2017 02:00', 'dd.mm.yyyy hh24:mi'), 'camera' from dual union all
6 select 'cc', to_date('19.05.2017 02:00', 'dd.mm.yyyy hh24:mi'), 'television' from dual
7 ),
8 table_b (id, trans_id, created_date, status_order) as
9 (select 1, 'aa', to_date('19.05.2017 02:00', 'dd.mm.yyyy hh24:mi'), 'waiting' from dual union all
10 select 2, 'aa', to_date('20.05.2017 02:00', 'dd.mm.yyyy hh24:mi'), 'in_process' from dual union all
11 select 3, 'bb', to_date('19.05.2017 02:00', 'dd.mm.yyyy hh24:mi'), 'waiting' from dual union all
12 select 4, 'cc', to_date('19.05.2017 02:00', 'dd.mm.yyyy hh24:mi'), 'waiting' from dual union all
13 select 5, 'cc', to_date('20.05.2017 02:00', 'dd.mm.yyyy hh24:mi'), 'cancelled' from dual
14 ),
15 table_c (id, trans_id, created_Date, status_payment) as
16 (select 1, 'bb', to_date('19.05.2017 02:00', 'dd.mm.yyyy hh24:mi'), 'waiting' from dual),
17 table_d (id, trans_id, created_date, status_contract) as
18 (select 1, 'aa', to_date('19.05.2017 02:00', 'dd.mm.yyyy hh24:mi'), 'in_process' from dual union all
19 select 2, 'aa', to_date('20.05.2017 02:00', 'dd.mm.yyyy hh24:mi'), 'approved' from dual union all
20 select 3, 'cc', to_date('19.05.2017 02:00', 'dd.mm.yyyy hh24:mi'), 'in_process' from dual union all
21 select 4, 'cc', to_date('20.05.2017 02:00', 'dd.mm.yyyy hh24:mi'), 'reject' from dual
22 ),
23 uni as
24 -- union a+b+c to have everything in the same "table" (CTE)
25 (select id trans_id, created_date, null status_order, null status_payment
26 from table_a
27 union all
28 select trans_id, created_date, status_order, null status_payment
29 from table_b
30 union all
31 select trans_id, created_date, null status_order, status_payment
32 from table_c
33 ),
34 latest as
35 -- latest date per TRANS_ID
36 (select trans_id,
37 max(created_date) created_date
38 from uni
39 group by trans_id
40 )
41 -- final query
42 select l.trans_id,
43 l.created_date,
44 max(u.status_order) status_order,
45 max(u.status_payment) status_payment,
46 max(d.status_contract) status_contract
47 from latest l
48 join uni u on u.trans_id = l.trans_id and u.created_date = l.created_date
49 left join table_d d on d.trans_id = l.trans_id and d.created_date = l.created_date
50 group by l.trans_id, l.created_Date
51 order by l.trans_id, l.created_Date;
TR CREATED_DATE STATUS_ORDER STATUS_PAYMENT STATUS_CONTRACT
-- ---------------- --------------- --------------- ---------------
aa 2017-05-20 02:00 in_process approved
bb 2017-05-19 02:00 waiting waiting
cc 2017-05-20 02:00 cancelled reject
SQL>