query-34f735e8c7a0b8998168770f773cad1e
Propertiesinstance of (P31)subclass of (P279)edition or translation of (P629)title (P1476)language of work or name (P407)translator (P655)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?work ?workLabel (GROUP_CONCAT(?workLanguageLabel) AS ?workLanguages) ?sitelinks ?translation ?title ?translationLanguageLabel (GROUP_CONCAT(DISTINCT ?translatorLabel;SEPARATOR=" | ") AS ?translators)
WHERE {
?translation wdt:P31/wdt:P279* wd:Q39811647 ;
wdt:P629 ?work .
?work wikibase:sitelinks ?sitelinks .
OPTIONAL {
?translation wdt:P1476 ?title .
}
OPTIONAL {?work wdt:P407 ?workLanguage}
OPTIONAL {
?translation wdt:P407 ?translationLanguage .
}
OPTIONAL {
?translation rdfs:label ?title .
FILTER(LANG(?title)="en")
}
OPTIONAL {
?translation wdt:P655 ?translator .
}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?workLanguage rdfs:label ?workLanguageLabel .
?translation rdfs:label ?title .
?work rdfs:label ?workLabel .
?translationLanguage rdfs:label ?translationLanguageLabel .
?translator rdfs:label ?translatorLabel .
}
}
GROUP BY ?sitelinks ?translation ?translationLabel ?title ?translationLanguageLabel ?work ?workLabel
ORDER BY DESC(?sitelinks) ?work ?translationLanguageLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?sitelinks"):::projected
v4("?title"):::projected
v5("?translation"):::projected
v7("?translationLanguage")
v3("?translationLanguageLabel"):::projected
v8("?translator")
v11("?translatorLabel"):::projected
v13("?translators")
v2("?work"):::projected
v10("?workLabel"):::projected
v6("?workLanguage")
v9("?workLanguageLabel"):::projected
v12("?workLanguages")
a1((" "))
c4(["wd:Q39811647"]):::iri
c12(["bd:serviceParam"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v5 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c4
v5 --"wdt:P629"--> v2
v2 --"wikibase:sitelinks"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."wdt:P1476".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P407".-> v6
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v5 -."wdt:P407".-> v7
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v5 -."rdfs:label".-> v4
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v5 -."wdt:P655".-> v8
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
v6 --"rdfs:label"--> v9
v5 --"rdfs:label"--> v4
v2 --"rdfs:label"--> v10
v7 --"rdfs:label"--> v3
v8 --"rdfs:label"--> v11
end
bind2[/"?workLanguageLabel"/]
v9 --o bind2
bind2 --as--o v12
bind3[/"?translatorLabel"/]
v11 --o bind3
bind3 --as--o v13