query-47740fc87c31a00abf305c8f8870a45b
Propertiesfirst line (P1922)language of work or name (P407)author (P50)ISO 639-1 code (P218)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?work ?workLabel ?authorLabel ?langLabel ?langlineLabel WHERE {
?work wdt:P1922 ?line;
wdt:P407 ?lang
OPTIONAL {?work wdt:P50 ?author}
BIND(lang(?line) AS ?langlinecode)
?langline wdt:P218 ?langlinecode
FILTER (?langline != ?lang)
SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en,de,fr,ru"}
} ORDER BY ?langLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?author")
v3("?lang")
v1("?langLabel"):::projected
v2("?langline")
v7("?langlinecode")
v5("?line")
v4("?work"):::projected
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,mul,en,de,fr,ru"]):::literal
f0[["?langline != ?lang"]]
f0 --> v2
f0 --> v3
v4 --"wdt:P1922"--> v5
v4 --"wdt:P407"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P50".-> v6
end
bind1[/"?line"/]
v5 --o bind1
bind1 --as--o v7
v2 --"wdt:P218"--> v7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end