query-d5557648b399f6809204a2df90fe6236

rq turtle/ttl

How to query and filter among ranks 00:19, 21 December 2021 (UTC) Jura had an empty section on this. I filled it with a few sample queries. Please expand/correct as it may seem useful to you. --- Help:RankingNice. I'm curious; efficiency-wise how does your 'not deprecated' query fare against something like this given a big working set?

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT * WHERE {
  VALUES ?truthy {
    wikibase:PreferredRank
    wikibase:NormalRank
  }
  wd:Q692 p:P569 ?st.
  ?st ps:P569 ?value.
  ?st wikibase:rank ?truthy. # <- more or less efficient?
  #MINUS { ?st wikibase:rank wikibase:DeprecatedRank. }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?st"):::projected v1("?truthy"):::projected v3("?value"):::projected c1(["wd:Q692"]):::iri bind0[/VALUES ?truthy/] bind0-->v1 bind00(["wikibase:PreferredRank"]) bind00 --> bind0 bind01(["wikibase:NormalRank"]) bind01 --> bind0 c1 --"p:P569"--> v2 v2 --"p:statement/P569"--> v3 v2 --"wikibase:rank"--> v1