query-8a87f05fced8302b71d74961808f852a

rq turtle/ttl

Other national societies: (Q1968122)national Red Cross and Red Crescent society but not instance of (Q1069175)International Federation of Red Cross and Red Crescent Societies or because marked as part of (Q1069175)International Federation of Red Cross and Red Crescent Societies that do not appear in the above tree because not marked as part of (Q1968122)national Red Cross and Red Crescent society Instances of

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?society ?societyLabel
WHERE {
  {
    ?society wdt:P31 wd:Q1968122.
    FILTER(NOT EXISTS { ?society (wdt:P749|wdt:P463|wdt:P361) []. })
  } UNION {
    ?society (wdt:P31/(wdt:P279*)) wd:Q43229;
      (wdt:P749|wdt:P463|wdt:P361) wd:Q1069175.
    FILTER(NOT EXISTS { ?society wdt:P31 wd:Q1968122. })
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de,sl". }
}
ORDER BY (?societyLabel)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?society"):::projected v1("?societyLabel"):::projected a1((" ")) a2((" ")) c8(["wd:Q1069175"]):::iri c5(["wd:Q1968122"]):::iri c10(["bd:serviceParam"]):::iri c12(["#91;AUTO_LANGUAGE#93;,en,de,sl"]):::literal c7(["wd:Q43229"]):::iri subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P31"--> e0c2 e0v1("?society"):::projected e0c2(["wd:Q1968122"]):::iri end f0--EXISTS--> f0e0 f0 --> v2 f0 --> c4 f0 --> c5 v2 --"wdt:P31"--> c5 v2 --"wdt:P31"--> a2 a2 --"wdt:P279"--> c7 subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P361"--> c8 end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P463"--> c8 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P749"--> c8 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; f1[["not "]] subgraph f1e1["Exists Clause"] subgraph unione10[" Union "] subgraph unione10l[" "] style unione10l fill:#abf,stroke-dasharray: 3 3; subgraph unione11[" Union "] subgraph unione11l[" "] style unione11l fill:#abf,stroke-dasharray: 3 3; e1v1 --"wdt:P361"--> e1a1 end subgraph unione11r[" "] style unione11r fill:#abf,stroke-dasharray: 3 3; e1v1 --"wdt:P463"--> e1a1 end unione11r <== or ==> unione11l end end subgraph unione10r[" "] style unione10r fill:#abf,stroke-dasharray: 3 3; e1v1 --"wdt:P749"--> e1a1 end unione10r <== or ==> unione10l end e1v1("?society"):::projected e1a1((" ")):::projected end f1--EXISTS--> f1e1 f1 --> v2 f1 --> c1 f1 --> a1 f1 --> c2 f1 --> c3 subgraph union3[" Union "] subgraph union3l[" "] style union3l fill:#abf,stroke-dasharray: 3 3; subgraph union4[" Union "] subgraph union4l[" "] style union4l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P361"--> a1 end subgraph union4r[" "] style union4r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P463"--> a1 end union4r <== or ==> union4l end end subgraph union3r[" "] style union3r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P749"--> a1 end union3r <== or ==> union3l end v2 --"wdt:P31"--> c5 end union0r <== or ==> union0l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end