Rows matching conditions in a directly related table or another, related indirectly
Suppose three tables: create table table_a( id int generated by default as identity primary key); create table table_c( id int generated by default as identity primary key , active boolean); create table table_b( id int generated by default as identity primary key , active boolean , table_a_id int references table_a(id) , table_c_id int references table_c(id));