Tag archive
Commands grouped around the same concept, pattern, or recurring problem.
Use `IS NULL` and `IS NOT NULL` to filter rows based on whether a column has a value.
Use a `LEFT JOIN` and filter for `NULL` on the joined table to find missing relationships.
Return the first non-null value from a list of expressions.
Use `NULLIF` to convert a specific value to `NULL`, most commonly to prevent division-by-zero errors.
`COUNT(column)` skips `NULL` values, while `COUNT(*)` counts every row that made it into the result set.
Filter `NULL` values out of the right side before using `NOT IN`, or the predicate can exclude everything.