GraphStore`
GraphStore`

SPARQLDistinct

SPARQLDistinct[]

is a query operator that deletes duplicate solutions.

Details

  • A RightComposition of operators SPARQLSelect[]/*/*SPARQLDistinct[]/* can be used in SPARQLExecute to query a SPARQL endpoint. Composition is also supported.
  • SPARQLDistinct[] can be applied to the result of a SPARQLSelect query.
  • Solutions are represented as associations.
  • SPARQLDistinct[] treats associations that differ only in the order of their keys as the same.

Examples

open allclose all

Basic Examples  (1)

Data about people:

Find distinct names:

Count the occurrences of each name:

Properties & Relations  (1)

The first two associations differ only in the order of their keys:

DeleteDuplicates treats associations with keys in a different order as different:

For SPARQLDistinct the order of keys does not matter:

This gives the same result: