GraphStore`
GraphStore`

SPARQLDistinct

SPARQLDistinct[]

is a query operator that deletes duplicate solutions.

Details and Options

  • 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:

Wolfram Research (2020), SPARQLDistinct, Wolfram Language function, https://reference.wolfram.com/language/GraphStore/ref/SPARQLDistinct.html.

Text

Wolfram Research (2020), SPARQLDistinct, Wolfram Language function, https://reference.wolfram.com/language/GraphStore/ref/SPARQLDistinct.html.

CMS

Wolfram Language. 2020. "SPARQLDistinct." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/GraphStore/ref/SPARQLDistinct.html.

APA

Wolfram Language. (2020). SPARQLDistinct. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/GraphStore/ref/SPARQLDistinct.html

BibTeX

@misc{reference.wolfram_2024_sparqldistinct, author="Wolfram Research", title="{SPARQLDistinct}", year="2020", howpublished="\url{https://reference.wolfram.com/language/GraphStore/ref/SPARQLDistinct.html}", note=[Accessed: 03-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_sparqldistinct, organization={Wolfram Research}, title={SPARQLDistinct}, year={2020}, url={https://reference.wolfram.com/language/GraphStore/ref/SPARQLDistinct.html}, note=[Accessed: 03-December-2024 ]}