protected function GetSQLQueryForQueryRestrictionForActiveFilter()
    {
        $dStartValue = $this->GetActiveStartValue();
        $dEndValue = $this->GetActiveEndValue();
        $sQuery = '';
        if (false !== $dStartValue && false !== $dEndValue) {
            $sEscapedTargetTable = MySqlLegacySupport::getInstance()->real_escape_string($this->sItemTableName);
            $sEscapedTargetMLTTable = MySqlLegacySupport::getInstance()->real_escape_string('shop_article_'.$this->sItemTableName.'_mlt');
            $oShopAttribute = $this->GetFieldShopAttribute();

            $sQuery = "SELECT `{$sEscapedTargetMLTTable}`.*
                     FROM `{$sEscapedTargetTable}`
               INNER JOIN `{$sEscapedTargetMLTTable}` ON `{$sEscapedTargetTable}`.`id` = `{$sEscapedTargetMLTTable}`.`target_id`
                    WHERE ".$this->GetTargetTableNameField().' >= '.MySqlLegacySupport::getInstance()->real_escape_string($dStartValue).'
                      AND '.$this->GetTargetTableNameField().' <= '.MySqlLegacySupport::getInstance()->real_escape_string($dEndValue)."
                      AND `{$sEscapedTargetTable}`.`shop_attribute_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($oShopAttribute->id)."'";
        }

        return $sQuery;
    }