SUM(CASE WHEN country IS NULL THEN 1 ELSE 0 END) AS missing_country, SUM(CASE WHEN agent IS NULL THEN 1 ELSE 0 END) AS missing_agent, SUM(CASE WHEN company IS NULL ...
Every senior DBA has the same drawer of half-remembered diagnostic queries: one from a blog in 2014, one from a conference USB stick, one written at 3 AM during an incident. They work — until they don ...