query-6df5790d412741b6afb1482cbb1e519c

rq turtle/ttl

Propertiesinstance of (P31)subclass of (P279)publication date (P577)inception (P571)author (P50)language of work or name (P407)

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 ?poem ?poemLabel ?languageLabel ?authorLabel ?year WHERE {
?poem wdt:P31/wdt:P279? wd:Q5185279;
OPTIONAL{?poem wdt:P577 ?pubdate}
OPTIONAL{?poem wdt:P571 ?inception}
OPTIONAL{?poem wdt:P50 ?author}
OPTIONAL{?poem wdt:P407 ?language}
BIND((IF (BOUND(?pubdate),?pubdate,?inception) ) AS ?date)
BIND(YEAR(?date) AS ?year)
FILTER (?year > 1699 && ?year < 1800)
SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en,de,fr,ru"}
} ORDER BY ?authorLabel ?year ?poemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?author") v1("?authorLabel"):::projected v9("?date") v6("?inception") v8("?language") v4("?poem"):::projected v3("?poemLabel"):::projected v5("?pubdate") v10("?year"):::projected a1((" ")) c11(["bd:serviceParam"]):::iri c13(["#91;AUTO_LANGUAGE#93;,mul,en,de,fr,ru"]):::literal c4(["wd:Q5185279"]):::iri f0[["?year > '1699^^xsd:integer'?year < '1800^^xsd:integer'"]] f0 --> v10 v4 --"wdt:P31"--> a1 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; a1 --"wdt:P279"--> c4 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P577".-> v5 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P571".-> v6 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P50".-> v7 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P407".-> v8 end bind1[/"if(bound(?pubdate),?pubdate,?inception)"/] v5 --o bind1 v6 --o bind1 bind1 --as--o v9 bind2[/"year-from-dateTime(?date)"/] v9 --o bind2 bind2 --as--o v10 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end