query-c0676ae6143b4daba75240304a9c6ae1

rq turtle/ttl

part of (P361)

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT (STRAFTER(STR(?part), STR(wd:)) AS ?1) ('P361' AS ?P361) (STRAFTER(STR(?group), STR(wd:)) AS ?2) ('S3452' AS ?S3452) (?2 AS ?from) {
  VALUES ?class { wd:Q3046146 wd:Q16979650 } .
  ?group wdt:P31/wdt:P279* ?class; wdt:P527 ?part .
  MINUS { ?part wdt:P361 ?group } .
} ORDER BY ?2

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?1") v7("?2"):::projected v6("?P361") v7("?S3452") v2("?class") v8("?from") v3("?group"):::projected v4("?part"):::projected a1((" ")) bind0[/VALUES ?class/] bind0-->v2 bind00(["wd:Q3046146"]) bind00 --> bind0 bind01(["wd:Q16979650"]) bind01 --> bind0 v3 --"wdt:P31"--> a1 a1 --"wdt:P279"--> v2 v3 --"wdt:P527"--> v4 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v4 --"wdt:P361"--> v3 end bind2[/"substring-after(str(?part),str('wd:'))"/] v4 --o bind2 bind2 --as--o v5 bind3[/"'P361'"/] bind3 --as--o v6 bind4[/"substring-after(str(?group),str('wd:'))"/] v3 --o bind4 bind4 --as--o v7 bind5[/"'S3452'"/] bind5 --as--o v7 bind6[/"?2"/] v7 --o bind6 bind6 --as--o v8