Can someone help me undertsand the IN(...) AS... in the select. This is the first time I'm seeing something like this. Also, how does the database determine the row value or newID? This is on Postgres datababse.
SELECT tbl_a.*, (
tbl_z.z_id IN (
SELECT x_id
FROM table_x
WHERE name = '...'
)
) AS newID
FROM (...)