0

I found that Wikidata API returns the data with some relevance order. For example look at the occupationvalues of https://www.wikidata.org/wiki/Q22686 and compare with occupation values list from here:

  VALUES (?company) {(wd:Q22686)}
  ?company ?p ?statement .
  ?statement ?ps ?ps_ .
  ?wd wikibase:claim ?p.
  ?wd wikibase:statementProperty ?ps.
   ?statement wikibase:rank ?rank.
  OPTIONAL {
    ?statement ?pq ?pq_ .
    ?wdpq wikibase:qualifier ?pq .
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

Try it

Is there a way to preserve property values order for SPARQL query?

Nox
  • 191
  • 1
  • 11

0 Answers0