@param string      $column
@param string|null $alias

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

        return 'SUM(' . $this->quoteName($column) . ')' . ($alias ? ' AS ' . $alias : '');
    }
1299821
public function column($name, string $alias = null): self
    {
        $this->sql->addColumn($name, $alias);
        return $this;
    }
338282
public function selectMin(string $column, string $alias = null)
    {
        $instance = $this->selectQueryInstance();

        $instance->selectQuery()->min($column, $alias);

        return $instance;
    }
616312
public function avg($column, $alias)
    {
        return $this->addSelectColumn(new Func\Avg(new Expr\Column($column)), $alias);
    }
1248500
public function avg(string $column, string $alias = null)
    {
        $this->columnRaw($this->dialect()->avg($column, $alias));

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

        return 'MIN(' . $this->quoteName($column) . ')' . ($alias ? ' AS ' . $alias : '');
    }
838874
public function count($column = '*', string $alias = null, bool $distinct = false): self
    {
        return $this->column((new Expression())->count($column, $distinct), $alias);
    }
236634
public function selectCount(string $column = '*', string $alias = null)
    {
        $instance = $this->selectQueryInstance();

        $instance->selectQuery()->count($column, $alias);

        return $instance;
    }
868616
public function max($column, $alias)
    {
        return $this->addSelectColumn(new Func\Max(new Expr\Column($column)), $alias);
    }
1061050
public function chunkById($count, callable $callback, $column = null, $alias = null)
    {
        $column = $column ?? $this->getRelated()->getQualifiedKeyName();

        $alias = $alias ?? $this->getRelated()->getKeyName();

        return $this->prepareQueryBuilder()->chunkById($count, $callback, $column, $alias);
    }
1007300
public function getTableForAlias($alias)
    {
        if (isset($this->aliases[$alias])) {
            return $this->aliases[$alias];
        }

        return null;
    }
585831
public function ucase($column, string $alias = null): self
    {
        return $this->column((new Expression())->ucase($column), $alias);
    }
1085532
public function count($column, $alias)
    {
        return $this->addSelectColumn(new Func\Count(new Expr\Column($column)), $alias);
    }
748698
public function min(string $column, string $alias = null)
    {
        $this->columnRaw($this->dialect()->min($column, $alias));

        return $this;
    }
1288301
public function selectMax(string $column, string $alias = null)
    {
        $instance = $this->selectQueryInstance();

        $instance->selectQuery()->max($column, $alias);

        return $instance;
    }
1320960
public function columns($column = null)
	{
		if($column !== null)
		{
			$this->select([$column]);
		}

		$query = $this->compiler->select();

		return $this->connection->columns($query['sql'], $query['params']);
	}
1279872
public function select($column, $alias = null)
    {
        $this->select[$this->columnQuote($column)] = $this->columnQuote($alias);
        
        return $this;
    }