CORE: forgot to re-add a SQL query that was removed