query-45e0da5f5c3c47769073903332f15a12
Get statement values in the same order as the Wikidata page? is at the bottom of the list, and this doesn't seem to ever change. SPARQL queries, on the other hand, have non-deterministic ordering if it's not explicitly specified using ORDER BY. If I run this query: (Q187655)Mostly Harmless is at the top of the list and (Q25169)The Hitchhiker's Guide to the Galaxy pentalogy , I see that (P800)notable work in the browser and look at (Q42)Douglas Adams Wikidata pages seem to have a constant order for the values of a statement for a given property. For example, if I visit
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?book ?bookLabel
WHERE {
wd:Q42 wdt:P800 ?book.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?book"):::projected
c4(["bd:serviceParam"]):::iri
c1(["wd:Q42"]):::iri
c6(["en"]):::literal
c1 --"wdt:P800"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end