Force the query to only return distinct results.

@param bool|string $column
@return $this
764901
public function distinct($column = false)
    {
        $this->distinct = true;

        if ($column) {
            $this->columns = [$column];
        }

        return $this;
    }
1326628
public function select($column)
    {
        $builder         = new Select($this->driver);
        $this->lastQuery = $builder;

        $columns = is_array($column) ? $column : func_get_args();

        return $builder->select($columns);
    }
600711
final public function groupBy($column)
    {
        $column = $this->formatColumn($column);
        $this->_sql['group'][] = $column;
        return $this;
    }
477469
public function select($columns)
    {
        settype($columns, 'array');
        $this->columns = array_unique(array_merge($this->columns, $columns));
        $this->operation = array('type' => self::QUERY_SELECT_DEFAULT, 'value' => '');

        return $this;
    }
343317
public function whereIsNull(string $column)
    {
        $instance = $this->whereStrategyInstance();

        $instance->whereStrategy()->whereIsNull($column);

        return $instance;
    }
1302701
public function protect($column)
	{
		if($column === false)
		{
			$this->protected = [];
		}
		else
		{
			$this->protected = array_unique(array_merge($this->protected, (array) $column));
		}

		return $this;
	}
1082579
public function columns(string $column, string ...$columns)
    {
        array_unshift($columns, $column);

        foreach ($columns as $column) {
            $this->column($column);
        }

        return $this;
    }
392251
protected function removeExistingOrdersFor($column)
	{
		return (new Collection($this->orders))
			->reject(function ($order) use ($column) {
				return isset($order['column']) ? $order['column'] === $column : false;
			})
			->values()
			->getAll();
	}
400238
public function havingIsNot(string $column)
    {
        $instance = $this->havingStrategyInstance();

        $instance->havingStrategy()->havingIsNot($column);

        return $instance;
    }
672728
public function select($columns)
    {
        if (is_array($columns)) {
            $this->columns = $columns;
        } elseif ($columns === '*') {
            $this->columns = ['*'];
        }
        return $this;
    }
869293
public function havingIs(string $column)
    {
        $instance = $this->havingStrategyInstance();

        $instance->havingStrategy()->havingIs($column);

        return $instance;
    }
793096
public function select($columns = "*")
    {
        $this->start = $columns;
        $this->queryType = self::QUERY_SELECT;
        return $this;
    }
1088233
public function avg($column, bool $distinct = false): self
    {
        return $this->addFunction('aggregateFunction', 'AVG', $column, ['distinct' => $distinct]);
    }
453834
public function distinct($distinct = true)
    {
        foreach ($this->queries as $query) {
            $query->distinct($distinct);
        }

        return $this;
    }
884471
public function max($column, bool $distinct = false)
    {
        parent::max($column, $distinct);
        return $this->getColumnResult();
    }
528293
public function avg($column, bool $distinct = false)
    {
        parent::avg($column, $distinct);
        return $this->getColumnResult();
    }
220597
public function select($column, ...$columns) {
        $this->params = [];
        if (count($columns)) {
            array_unshift($columns, $column);
            $columnStr = implode('`,`', $columns);
            $this->sql = "SELECT `{$columnStr}` ";
        } else {
            $this->sql = "SELECT {$column} ";
        }
        return $this;
    }