query-6a37b8b955d4dfb3a0ea232c2021ddc7

rq turtle/ttl

Propertiesinstance of (P31)subclass of (P279)inventory number (P217)depicts (P180)from narrative universe (P1080)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?enwp ?depictsLabel WHERE {
?item wdt:P31/wdt:P279? wd:Q223557 . # instance of object
?item wdt:P217 ?inventory . #has inventory number
?item wdt:P180 wd:Q14080 
OPTIONAL {?enwp schema:about ?item; schema:isPartOf <https://en.wikipedia.org/> }

MINUS {?item wdt:P1080 []} # exclude fictional (Pandora's Box)
SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,el,fr,de,pl,uk"}
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?enwp"):::projected v2("?inventory") v1("?item"):::projected a2((" ")) a1((" ")) c14(["#91;AUTO_LANGUAGE#93;,en,el,fr,de,pl,uk"]):::literal c6(["wd:Q14080"]):::iri c2(["wd:Q223557"]):::iri c9([https://en.wikipedia.org/]):::iri c12(["bd:serviceParam"]):::iri v1 --"wdt:P31"--> a1 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; a1 --"wdt:P279"--> c2 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; end union0r <== or ==> union0l end v1 --"wdt:P217"--> v2 v1 --"wdt:P180"--> c6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."schema:about".-> v1 v3 --"schema:isPartOf"--> c9 end subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P1080"--> a2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end