@param string      $column
@param string|null $as
@param string|null $tableAlias

@return \Colibri\Database\Query\Aggregation
196446
public static function count(string $column, string $as = null, string $tableAlias = null): self
    {
        return new self(Aggregation\Type::COUNT, $column, $as, $tableAlias);
    }
1119466
public function func($func, $column, $alias = null)
    {
        $this->queryBuilder->func($func, $column, $alias);
        return $this;
    }
652761
public function addMax($column, string $alias = null): self
    {
        return $this->addAggregate('MAX', $column, $alias);
    }
74780
public function max($column, $alias = null)
    {
        $this->queryBuilder->max($column, $alias);
        return $this;
    }
1128524
@Override
	public SqlEntityQuery<E> asc(final String col, final Nulls nulls) {
		this.sortOrders.add(new SortOrder(col, Order.ASCENDING, nulls));
		return this;
	}
650331
public function setTableAlias($tableAlias)
    {
        if (trim($tableAlias) == '') {
            $tableAlias = null;
        }
        $this->tableAlias = $tableAlias;

        return $this;
    }
1085532
public function count($column, $alias)
    {
        return $this->addSelectColumn(new Func\Count(new Expr\Column($column)), $alias);
    }
946361
public function orderAsc(string $column)
    {
        $instance = $this->orderByStrategyInstance();

        $instance->orderByStrategy()->orderAsc($column);

        return $instance;
    }
1322460
public function alias(string $alias, ?string $table = null): IQueryBuilderHandler
    {
        if ($table === null && isset($this->statements['tables'][0]) === true) {
            $table = $this->statements['tables'][0];
        } else {
            $table = $this->tablePrefix . $table;
        }

        $this->statements['aliases'][$table] = \strtolower($alias);

        return $this;
    }
583257
public function max(string $column, string $alias = null)
    {
        $this->columnRaw($this->dialect()->max($column, $alias));

        return $this;
    }
638360
public function count(string $column = '*', string $as = null)
    {
        $this->columns = [
            '' => [Query\Aggregation::count($column, $as)],
        ];

        return $this;
    }
316025
public function column($column, bool $allowAlias = false): string
	{
		if($column instanceof Raw)
		{
			return $this->raw($column);
		}
		elseif($column instanceof Subquery)
		{
			return $this->subquery($column);
		}
		elseif($allowAlias && stripos($column, ' AS ') !== false)
		{
			[$column, , $alias] = explode(' ', $column, 3);

			return sprintf('%s AS %s', $this->compileColumnName($column), $this->compileColumnName($alias));
		}

		return $this->compileColumnName($column);
	}
986288
public function sum(string $column, string $alias = null)
    {
        $this->columnRaw($this->dialect()->sum($column, $alias));

        return $this;
    }
643278
public function avg(string $column, string $alias = null): string
    {
        if ($alias) {
            $alias = $this->quoteName($alias);
        }

        return 'AVG(' . $this->quoteName($column) . ')' . ($alias ? ' AS ' . $alias : '');
    }
475682
public static function alias(array $tokens) {
        $column     = self::column($tokens, new MetaData());
        $tableAlias = Table::alias($tokens);

        return empty($tableAlias) ? $column : $tableAlias . '.' . $column;
    }
1055581
public function select(string $column, string ...$columns)
    {
        $instance = $this->selectQueryInstance();

        $instance->selectQuery()->columns($column, ...$columns);

        return $instance;
    }
757419
protected function getSelectJoinColumnSQL($tableAlias, $joinColumnName, $className, $type)
    {
        $columnAlias = $this->getSQLColumnAlias($joinColumnName);

        $this->currentPersisterContext->rsm->addMetaResult('r', $columnAlias, $joinColumnName, false, $type);

        return $tableAlias . '.' . $joinColumnName . ' AS ' . $columnAlias;
    }