Hot fix for the SQL statement getting stats