clear markdown compare help best fiddles feedback
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 2805483 fiddles created (40776 in the last week).

select * from V$VERSION;
Oracle Database 11g Express Edition Release - 64bit Production
PL/SQL Release - Production
CORE Production
TNS for Linux: Version - Production
NLSRTL Version - Production
 hidden batch(es)

with records (id) as ( select 1 from dual), assessment (id, record_id, color) as( select 1, 1, 'red' from dual union all select 2, 1, 'blue ' from dual), dictionary (color, prio) as ( select 'red', 1 from dual union all select 'blue', 2 from dual union all select 'green', 3 from dual) select, a.color from records r join ( select record_id, max (a.color) keep (dense_rank first order by prio) color from assessment a, dictionary d where d.color = a.color group by record_id) a on a.record_id =
1 red
 hidden batch(es)