query-76ddd11a66f4b4e459a504af36828ac2

rq turtle/ttl

16:55, 29 May 2017 (UTC), XXN? Try:

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item ?rank WHERE {
  VALUES ?rank { wikibase:PreferredRank wikibase:NormalRank }
  ?item p:P31 [ ps:P31 wd:Q4229812; wikibase:rank ?rank ] .
  ?item wdt:P17 wd:Q217 .
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v1("?rank"):::projected a1((" ")) c6(["wd:Q217"]):::iri c2(["wd:Q4229812"]):::iri bind0[/VALUES ?rank/] bind0-->v1 bind00(["wikibase:PreferredRank"]) bind00 --> bind0 bind01(["wikibase:NormalRank"]) bind01 --> bind0 a1 --"p:statement/P31"--> c2 a1 --"wikibase:rank"--> v1 v2 --"p:P31"--> a1 v2 --"p:direct/P17"--> c6