WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

SPARQLValues["var",{val1,val2,}]

binds the values vali to the variable "var".

SPARQLValues[{"var1","var2",},{{val11,val21,},}]

binds the values valij to the variables "vari".

Examples  
Basic Examples  
Properties & Relations  
See Also
Related Guides
Cite this Page

SPARQLValues["var",{val1,val2,}]

binds the values vali to the variable "var".

SPARQLValues[{"var1","var2",},{{val11,val21,},}]

binds the values valij to the variables "vari".

Examples

open all close all

Basic Examples  (1)

Wolfram Language code: Needs["GraphStore`"]

Data about fruits:

Wolfram Language code: fruitGraph = GraphStore`RDFStore[{GraphStore`RDFTriple[URL["http://example.org/banana"], URL["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"], URL["http://example.org/Fruit"]], GraphStore`RDFTriple[URL["http://example.org/banana"], URL["http://schema.o ... ttp://example.org/strawberry"], URL["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"], URL["http://example.org/Fruit"]], GraphStore`RDFTriple[URL["http://example.org/strawberry"], URL["http://schema.org/color"], "red"]}, Association[]];

Look up the color of bananas and cherries:

Wolfram Language code: schema[s_] := URL["http://schema.org/" <> s]; ex[s_] := URL["http://example.org/" <> s];
Wolfram Language code: fruitGraph//SPARQLSelect[{ SPARQLValues["fruit", {ex["banana"], ex["cherry"]}], RDFTriple[SPARQLVariable["fruit"], schema["color"], SPARQLVariable["color"]] }]

Properties & Relations  (1)

Wolfram Language code: Needs["GraphStore`"]

Specify combined values for x and y:

Wolfram Language code: RDFStore[{}]//SPARQLSelect[{ SPARQLValues[{"x", "y"}, { {1, 2}, {4, 5}, {7, 8} }] }]

Specifying values for x and y independently produces a different result:

Wolfram Language code: RDFStore[{}]//SPARQLSelect[{ SPARQLValues["x", {1, 4, 7}], SPARQLValues["y", {2, 5, 8}] }]

The latter is the outer join of bindings for both variables:

Wolfram Language code: Flatten[Outer[ Join, {<|"x" -> 1|>, <|"x" -> 4|>, <|"x" -> 7|>}, {<|"y" -> 2|>, <|"y" -> 5|>, <|"y" -> 8|>} ], 1]
Wolfram Language code: % == %%
Wolfram Research (2019), SPARQLValues, Wolfram Language function, https://reference.wolfram.com/language/GraphStore/ref/SPARQLValues.html.

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2026_sparqlvalues, author="Wolfram Research", title="{SPARQLValues}", year="2019", howpublished="\url{https://reference.wolfram.com/language/GraphStore/ref/SPARQLValues.html}", note=[Accessed: 17-August-2026]}

BibLaTeX

@online{reference.wolfram_2026_sparqlvalues, organization={Wolfram Research}, title={SPARQLValues}, year={2019}, url={https://reference.wolfram.com/language/GraphStore/ref/SPARQLValues.html}, note=[Accessed: 17-August-2026]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /