I have this table:
create table testtb (c1 number, c2 number);
insert into testtb values (1, 100);
insert into testtb values (2, 100);
insert into testtb values (3, 100);
insert into testtb values (3, 101);
insert into testtb values (4, 101);
insert into testtb values (5, 102);
commit;
I'm struggling to find an SQL query that returns the following result when the where clause is: "c2 = 100"
result set:
c1 c2
-- ---
1 100
2 100
3 100
3 101
4 101
As a result, the result set contains "3,101" because it is available through "3,100". And the same goes for "4,101": reachable value → "3,101" → "3,100".
UPDATE: . , . , "c2 = 100", "3,101" "4,101", .
.