query-211fb8a930a4181ccb8ba7894cba7a6b

rq turtle/ttl

creative work (Q17537576) (except scholarly article (Q13442814))

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT DISTINCT ?item ?statements WHERE {
   {
  SELECT DISTINCT ?class WHERE {
    ?class wdt:P279* wd:Q17537576 .
    FILTER(?class NOT IN (wd:Q13442814)) .
  }
}.
  ?item wdt:P31 ?class; wikibase:identifiers 0; wikibase:sitelinks 0; wikibase:statements ?statements .
  MINUS { [] ?backlink ?item }
  MINUS { ?item p:P973|p:P1343|p:P528 [] }
  OPTIONAL { ?item ?p [ prov:wasDerivedFrom [ ?pr [] ] ] . FILTER(?pr NOT IN (pr:P143, pr:P3452, pr:P4656)) . } FILTER(!BOUND(?p)) .
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?backlink") v3("?class") v4("?item"):::projected v1("?p") v2("?pr") v5("?statements"):::projected a1((" ")) a2((" ")) a5((" ")) a3((" ")) a4((" ")) c6(["wd:Q17537576"]):::iri c9(["0^^xsd:integer"]):::literal f0[["not bound(?p)"]] f0 --> v1 f1[["?class != 'wd:Q13442814'"]] f1 --> v3 v3 --"p:direct/P279"--> c6 v4 --"p:direct/P31"--> v3 v4 --"wikibase:identifiers"--> c9 v4 --"wikibase:sitelinks"--> c9 v4 --"wikibase:statements"--> v5 subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; a1 -->v6--> v4 end subgraph minus3["MINUS"] style minus3 stroke-width:6px,fill:pink,stroke:red; subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v4 --"p:P528"--> a2 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v4 --"p:P1343"--> a2 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v4 --"p:P973"--> a2 end union0r <== or ==> union0l end end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; a3 -->v2--> a4 a5 -."prov:wasDerivedFrom".-> a3 v4 -->v1--> a5 end