query-116b4c5833fcbafe6e302b7b33f4d6fb

rq turtle/ttl

Check citizenship

Use at

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 (COUNT(?item) AS ?cocs) {
  ?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
  ?item wdt:P27 ?coc .
  FILTER NOT EXISTS {
    ?item wdt:P570 ?dod .
  }
  ?coc wdt:P31/wdt:P279* wd:Q15893266 .
} GROUP BY ?item ORDER BY DESC(?cocs)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?coc") v5("?cocs") v3("?dod") v2("?item"):::projected a1((" ")) a2((" ")) a3((" ")) c8(["wd:Q15893266"]):::iri c5(["wd:Q26270618"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"p:direct/P570"--> e0v2 e0v2("?dod"):::projected e0v1("?item"):::projected end f0--EXISTS--> f0e0 f0 --> v2 f0 --> c1 f0 --> v3 v2 --"p:direct/P570"--> v3 v2 --"p:P106"--> a1 a1 --"p:statement/P106"--> a2 a2 --"p:direct/P279"--> c5 v2 --"p:direct/P27"--> v4 v4 --"p:direct/P31"--> a3 a3 --"p:direct/P279"--> c8 bind2[/"count(?item)"/] v2 --o bind2 bind2 --as--o v5