_db->select(); $select->from($this->_getPair('User'), self::getAutocompleteColumns()); $select->join($this->_getPair('Company', 'c'), '`c`.`id` = `User`.`companyId`', []); $select->where('User.`bought` = "y"'); $select->limit(10); return $select; } }