Found while helping @Jpita to setup his local dev environment. When trying to visit Special:CXStats, page never loads. With debug=1 flag, following trace is logged in console:
"Wikimedia\Rdbms\DBQueryError at /Users/josepita/code/mediawiki/core/includes/libs/rdbms/database/Database.php(1586) #0 /Users/josepita/code/mediawiki/core/includes/libs/rdbms/database/Database.php(1554): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string) #1 /Users/josepita/code/mediawiki/core/includes/libs/rdbms/database/Database.php(1274): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean) #2 /Users/josepita/code/mediawiki/core/includes/libs/rdbms/database/Database.php(1782): Wikimedia\Rdbms\Database->query(string, string) #3 /Users/josepita/code/mediawiki/core/extensions/ContentTranslation/includes/Translation.php(363): Wikimedia\Rdbms\Database->select(array, array, array, string, array) #4 /Users/josepita/code/mediawiki/core/extensions/ContentTranslation/api/ApiQueryContentTranslationLanguageTrend.php(43): ContentTranslation\Translation::getDeletionTrend(string) #5 /Users/josepita/code/mediawiki/core/includes/api/ApiQuery.php(250): ApiQueryContentTranslationLanguageTrend->execute() #6 /Users/josepita/code/mediawiki/core/includes/api/ApiMain.php(1595): ApiQuery->execute() #7 /Users/josepita/code/mediawiki/core/includes/api/ApiMain.php(531): ApiMain->executeAction() #8 /Users/josepita/code/mediawiki/core/includes/api/ApiMain.php(502): ApiMain->executeActionWithErrorHandling() #9 /Users/josepita/code/mediawiki/core/api.php(87): ApiMain->execute() #10 {main}"
This happens when there are no edits on local wiki. After publishing some translation with CX and visiting Special:CXStats loads correctly.