query-55077256fa6cb82d18c965db6395637b

rq turtle/ttl

Propertiesinstance of (P31)PM20 folder ID (P4293)main subject (P921)

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:P31 wd:Q91257459 ; 
        wdt:P4293 ?pm20Id ;
        wdt:P921 ?subject .
  filter(not exists {
    ?subject wdt:P31 wd:Q92707903 .
  })

  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
order by ?subject

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v3("?pm20Id") v1("?subject") c2(["wd:Q92707903"]):::iri c7(["bd:serviceParam"]):::iri c9(["en"]):::literal c3(["wd:Q91257459"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P31"--> e0c2 e0v1("?subject"):::projected e0c2(["wd:Q92707903"]):::iri end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> c2 v1 --"wdt:P31"--> c2 v2 --"wdt:P31"--> c3 v2 --"wdt:P4293"--> v3 v2 --"wdt:P921"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end