WITH t1 AS ( SELECT 1000 grp, 'A1' name FROM dual UNION ALL SELECT 1000, 'A2' FROM dual ) , t2 AS ( SELECT 1000 grp, 'B1' name FROM dual UNION ALL SELECT 1000, 'B2' FROM dual ) , t3 AS ( SELECT grp, name, 1 lv FROM t1 UNION ALL SELECT grp, name, 2 lv FROM t2 ) SELECT * FROM t3 START WITH lv = 1 CONNECT BY PRIOR grp = grp AND PRIOR lv + 1 = lv ;