query-686981a0dea15e4c769ad63cfa6ef0ab

rq turtle/ttl

Propertiesinstance of (P31)subclass of (P279)inspired by (P941)P794

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?fiction ?fictionLabel ?fictionDescription ?realLabel ?realDescription ?asLabel WHERE {
?fiction p:P941 ?statement;
         wdt:P31/wdt:P279* wd:Q95074.
  ?statement ps:P941 ?real.
  ?real wdt:P31 wd:Q5
OPTIONAL {?statement pq:P794 ?as}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?fictionLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?as") v2("?fiction"):::projected v1("?fictionLabel"):::projected v4("?real") v3("?statement") a1((" ")) c9(["bd:serviceParam"]):::iri c6(["wd:Q5"]):::iri c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal c4(["wd:Q95074"]):::iri v2 --"p:P941"--> v3 v2 --"p:direct/P31"--> a1 a1 --"p:direct/P279"--> c4 v3 --"p:statement/P941"--> v4 v4 --"p:direct/P31"--> c6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P794".-> v5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end