selectDistinct() accepts an arbitrary number of parameters. Each
parameter must contain either the name of a column or an array
containing the names of the columns.
Each call to selectDistinct() appends columns to the list of columns
that will be used in the query.
Example:
$q->selectDistinct( 'column1', 'column2' );
The same could also be written
$columns[] = 'column1';
$columns[] = 'column2;
$q->selectDistinct( $columns );
or using several calls
$q->selectDistinct( 'column1' )->select( 'column2' );
Each of above code produce SQL clause 'SELECT DISTINCT column1, column2'
for the query.
You may call select() after calling selectDistinct() which will result
in the additional columns beein added. A call of selectDistinct() after
select() will result in an \eZ\Publish\Core\Persistence\Database\SelectQueryInvalidException.