query-d551fc10bbaf14a33173787bd52b8bf5

rq turtle/ttl

PropertiesReactome ID (P3937)has part(s) (P527)instance of (P31)

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 ?item ?itemLabel  WHERE {
   ?item wdt:P3937 ?reactome_id ;
         wdt:P527 ?pwpart .
    FILTER NOT EXISTS {
       {?pwpart wdt:P31 wd:Q4915012 }
        UNION 
       {?pwpart wdt:P31 wd:Q2996394 }
       ?pwpart wdt:P527 ?child_node .
      }       
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?child_node") v3("?item"):::projected v1("?pwpart") v4("?reactome_id") c3(["wd:Q2996394"]):::iri c7(["bd:serviceParam"]):::iri c2(["wd:Q4915012"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] subgraph unione00[" Union "] subgraph unione00l[" "] style unione00l fill:#abf,stroke-dasharray: 3 3; e0v1 --"wdt:P31"--> e0c3 end subgraph unione00r[" "] style unione00r fill:#abf,stroke-dasharray: 3 3; e0v1 --"wdt:P31"--> e0c2 end unione00r <== or ==> unione00l end e0v1 --"wdt:P527"--> e0v2 e0v2("?child_node"):::projected e0v1("?pwpart"):::projected e0c3(["wd:Q2996394"]):::iri e0c2(["wd:Q4915012"]):::iri end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> c2 f0 --> c3 f0 --> c4 f0 --> v2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> c3 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> c2 end union0r <== or ==> union0l end v1 --"wdt:P527"--> v2 v3 --"wdt:P3937"--> v4 v3 --"wdt:P527"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end