src/DatabaseQuery.php
public function unionDistinct($query, $glue = '')
	{
		$distinct = true;

		// Apply the distinct flag to the union.
		return $this->union($query, $distinct, $glue);
	}
public function unionDistinct($query, $glue = '')
	{
		$distinct = true;

		// Apply the distinct flag to the union.
		return $this->union($query, $distinct, $glue);
	}
public function unionDistinct ( $ query , $ glue = '' ) { $ distinct = true ; // Apply the distinct flag to the union. return $ this -> union ( $ query , $ distinct , $ glue ) ; }
Add a query to UNION DISTINCT with the current query. Simply a proxy to Union with the Distinct clause.

Usage:
$query->unionDistinct('SELECT name FROM  #__foo')

@param   DatabaseQuery|string  $query  The DatabaseQuery object or string to union.
@param   string                $glue   The glue by which to join the conditions.

@return  DatabaseQuery  Returns this object to allow chaining.

@since   1.0
Add a query to UNION DISTINCT with the current query . Simply a proxy to Union with the Distinct clause .