query-20d15c26d39c6a79e03bb3ba7cc498e4

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT DISTINCT ?item ?goid ?stmt1 ?rank ?sgoid
WHERE
{

{
  SELECT ?item ?goid ?rank ?sgoid ?P279val
  WHERE
  {
    ?item wdt:P686 ?goid .
    ?item wdt:P279 ?P279val .
    ?P279val p:P686 ?gostmt .
    ?gostmt ps:P686 ?sgoid .
    ?gostmt wikibase:rank ?rank .
  }
}  ?item p:P279 ?stmt1 . 
  ?stmt1 ps:P279 ?P279val . 
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?P279val") v2("?goid"):::projected v4("?gostmt") v1("?item"):::projected v6("?rank"):::projected v5("?sgoid"):::projected v7("?stmt1"):::projected v1 --"p:direct/P686"--> v2 v1 --"p:direct/P279"--> v3 v3 --"p:P686"--> v4 v4 --"p:statement/P686"--> v5 v4 --"wikibase:rank"--> v6 v1 --"p:P279"--> v7 v7 --"p:statement/P279"--> v3