I would like to know how to create a boolean column notifying that this id exists between the tables.
example: if this ID is only table 1, true as table_1, false as table_2, false table_3.
If this ID is on table 1 and table 2, true as table_1, true as table_2, false table_3.
EXAMPLE:
select
case when a.id is not null or b.id is not null or c.id then True else False end as table_1,
case when a.id is not null or b.id is not null or c.id then True else False end as table_2
from table
left join table_2 using (id)
left join table_3 using (id)