Tag archive
Commands grouped around the same concept, pattern, or recurring problem.
Use `EXISTS` when you only need to test whether a related row exists, not return one output row per match.
`UNION` removes duplicates, while `UNION ALL` keeps them. Picking the wrong one silently changes row counts.
Group rows by the candidate key and keep only values that appear more than once.