SPARQLQuery[query]
is a query operator that can be applied to an RDFStore.
SPARQLQuery["query"]
uses a SPARQL query string.


SPARQLQuery
SPARQLQuery[query]
is a query operator that can be applied to an RDFStore.
SPARQLQuery["query"]
uses a SPARQL query string.
Details and Options
- SPARQLQuery can be used in SPARQLExecute to query a SPARQL endpoint.
- query can be a SPARQLSelect, SPARQLAsk or SPARQLConstruct operator.
- An aggregate can be specified as SPARQLQuery[SPARQLSelect[…]/*SPARQLAggregate[…]].
- The following options can be given:
-
"Base" Automatic base IRI used to resolve relative IRIs "From" Automatic default graph to query "FromNamed" Automatic list of named graphs to query - With the setting "From"{iri1,iri2,…} the RDF merge of the graphs identified by the irii is used as default graph.
- SPARQLQuery[File[...]] and SPARQLQuery[URL[...]] are also supported.
Examples
open all close allRelated Guides
Text
Wolfram Research (2019), SPARQLQuery, Wolfram Language function, https://reference.wolfram.com/language/GraphStore/ref/SPARQLQuery.html.
CMS
Wolfram Language. 2019. "SPARQLQuery." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/GraphStore/ref/SPARQLQuery.html.
APA
Wolfram Language. (2019). SPARQLQuery. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/GraphStore/ref/SPARQLQuery.html
BibTeX
@misc{reference.wolfram_2025_sparqlquery, author="Wolfram Research", title="{SPARQLQuery}", year="2019", howpublished="\url{https://reference.wolfram.com/language/GraphStore/ref/SPARQLQuery.html}", note=[Accessed: 11-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_sparqlquery, organization={Wolfram Research}, title={SPARQLQuery}, year={2019}, url={https://reference.wolfram.com/language/GraphStore/ref/SPARQLQuery.html}, note=[Accessed: 11-August-2025]}