public function buildSubSelect(Table $fromTable) : Select
    {
        $subSelect = Select::from($fromTable);
        $subSelect->setAlias($this->generateUniqueAliasFor($fromTable->getName()));

        $subSelect->outerSelectAliases = $this->getTakenAliases();

        return $subSelect;
    }