Joins

Lateral

Postgres version of SQL's CROSS APPLY


SELECT *
FROM tableA
LEFT JOIN LATERAL (SELECT COUNT(*) Cnt FROM tableB WHERE tableB.column = tableA.column) tableB ON TRUE
Where

Logical joins

AND
OR

Integer comparison

WHERE column = 1

Boolean comparison

WHERE column IS TRUE