* Fix aggregated stats query to support MySQL 8 (#3219).
