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.
Put right-table filters in the `ON` clause when you want to keep unmatched left-side rows.
Match string columns against a wildcard pattern using `LIKE`.
Use `IN` to match a column against a list of values in a single `WHERE` clause.
Return only rows that match a condition, with explicit ordering for stable output.
Use `BETWEEN` to match rows where a column falls within an inclusive lower and upper bound.
`WHERE` filters individual rows before grouping. `HAVING` filters grouped results after aggregates are computed.