FIND YOUR NEXT FEW LINES
The snippet library.
Small, practical examples. Search by task or narrow things down below.
5 snippets foundClear filters
Count rows per category
Aggregate rows sharing the same category.
GROUP BY✓ Tested
Filter aggregate groups
Keep only categories with multiple products.
HAVING✓ Tested
Label rows with CASE
Derive a readable label from a condition.
CASE✓ Tested
Replace NULL in a result
Choose a fallback for a missing value.
COALESCE✓ Tested
Sum values per category
Calculate a grouped total.
SUM✓ Tested