The DISTINCT keyword is used to remove duplicate values from a result of a SQL or SPARQL query.
The DISTINCT
keyword is used to remove duplicate values from a result of a SQL or SPARQL query.
The SQL 92 Standard defines DISTINCT as:
Two values are said to be not distinct if either: both are the null value, or they compare equal... Otherwise they are distinct. Two rows (or partial rows) are distinct if at least one of their pairs of respective values is distinct. Otherwise they are not distinct.
The SPARQL 1.1 Specification describes DISTINCT as:
The
DISTINCT
solution modifier eliminates duplicate solutions. Only one solution that binds the same variables to the same RDF terms is returned from the query.