$selectReference = $connection->select()
            ->from(['reference' => $referenceTableName], ['term', 'thesaurus_id', 'count' => 'COUNT(*)'])
            ->where('reference.term IN (?)', $terms)
            ->where('reference.thesaurus_id != ?', $this->getId())
            ->group(['term', 'thesaurus_id']);