Tag archive
Commands grouped around the same concept, pattern, or recurring problem.
Use `CASE WHEN` inside `SUM` or `COUNT` to produce multiple metrics from a single pass over grouped data.
Evaluate conditions row-by-row inside a `SELECT` to produce computed columns based on branching logic.
Use a `CASE` expression in `ORDER BY` to apply a custom sort order that is not alphabetical or numeric.