public function toSQL(Parameters $params, bool $inner_clause)
    {
        $q = $this->getQuery();
        $t = $this->getType();
        
        $scope = $params->getSubScope($this->sub_scope_number);
        $this->sub_scope_number = $scope->getScopeID();
        return 'UNION ' . $t . ' (' . $params->getDriver()->toSQL($scope, $q) . ')';
    }