SPARQLOrderBy[expr]
is a query operator that sorts solutions by the value of expr.
SPARQLOrderBy[expr"order"]
sorts in ascending or descending order.
SPARQLOrderBy[{spec1,spec2,…}]
breaks ties by successively using the speci.
SPARQLOrderBy
SPARQLOrderBy[expr]
is a query operator that sorts solutions by the value of expr.
SPARQLOrderBy[expr"order"]
sorts in ascending or descending order.
SPARQLOrderBy[{spec1,spec2,…}]
breaks ties by successively using the speci.
更多信息和选项
- A RightComposition of operators SPARQLSelect[…]/*…/*SPARQLOrderBy[…]/*... can be used in SPARQLExecute to query a SPARQL endpoint. Composition is also supported.
- SPARQLOrderBy[…] can be applied to the result of a SPARQLSelect query.
- "order" can be "Ascending" or "Descending". The default is "Ascending".
范例
基本范例 (1)
Needs["GraphStore`"]books = GraphStore`RDFStore[{GraphStore`RDFTriple[URL["http://example.org/gravitation"],
URL["https://schema.org/datePublished"], DateObject[{1973}, "Year", "Gregorian", 2.]],
GraphStore`RDFTriple[URL["http://example.org/faust"], URL["https://schema.org/datePublished"],
DateObject[{1808}, "Year", "Gregorian", 2.]]}, Association[]];Find books ordered by publication date, with the newest first:
books//SPARQLQuery[
SPARQLSelect[RDFTriple[SPARQLVariable["book"], URL["https://schema.org/datePublished"], SPARQLVariable["date"]]] /*
SPARQLOrderBy[SPARQLVariable["date"] -> "Descending"]
]文本
Wolfram Research (2020),SPARQLOrderBy,Wolfram 语言函数,https://reference.wolfram.com/language/GraphStore/ref/SPARQLOrderBy.html.
CMS
Wolfram 语言. 2020. "SPARQLOrderBy." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/GraphStore/ref/SPARQLOrderBy.html.
APA
Wolfram 语言. (2020). SPARQLOrderBy. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/GraphStore/ref/SPARQLOrderBy.html 年
BibTeX
@misc{reference.wolfram_2026_sparqlorderby, author="Wolfram Research", title="{SPARQLOrderBy}", year="2020", howpublished="\url{https://reference.wolfram.com/language/GraphStore/ref/SPARQLOrderBy.html}", note=[Accessed: 15-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_sparqlorderby, organization={Wolfram Research}, title={SPARQLOrderBy}, year={2020}, url={https://reference.wolfram.com/language/GraphStore/ref/SPARQLOrderBy.html}, note=[Accessed: 15-August-2026]}