query-76a810c18105afcada8e1e00629a67d2
.on Mastodon and on TwitterOriginally posted
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 ?language ?languageLabel (GROUP_CONCAT(DISTINCT ?creatorLabel; separator = ", ") AS ?creators) ?sitelinks WHERE {
?language wdt:P31?/wdt:P279* wd:Q9143;
wdt:P170|wdt:P178|wdt:P61|wdt:P287 ?creator;
wikibase:sitelinks ?sitelinks.
?creator wdt:P31 wd:Q5;
wdt:P21/wdt:P279? wd:Q6581072.
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?language rdfs:label ?languageLabel.
?creator rdfs:label ?creatorLabel.
}
}
GROUP BY ?language ?languageLabel ?sitelinks
ORDER BY DESC(?sitelinks)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?creator")
v5("?creatorLabel"):::projected
v6("?creators")
v2("?language"):::projected
v4("?languageLabel"):::projected
v1("?sitelinks"):::projected
a1((" "))
a2((" "))
c11(["wd:Q6581072"]):::iri
c13(["bd:serviceParam"]):::iri
c3(["wd:Q9143"]):::iri
c9(["wd:Q5"]):::iri
c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> a1
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
end
union0r <== or ==> union0l
end
a1 --"wdt:P279"--> c3
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P287"--> v3
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P61"--> v3
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P178"--> v3
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P170"--> v3
end
union1r <== or ==> union1l
end
v2 --"wikibase:sitelinks"--> v1
v3 --"wdt:P31"--> c9
v3 --"wdt:P21"--> a2
subgraph union4[" Union "]
subgraph union4l[" "]
style union4l fill:#abf,stroke-dasharray: 3 3;
a2 --"wdt:P279"--> c11
end
subgraph union4r[" "]
style union4r fill:#abf,stroke-dasharray: 3 3;
end
union4r <== or ==> union4l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
v2 --"rdfs:label"--> v4
v3 --"rdfs:label"--> v5
end
bind1[/"?creatorLabel"/]
v5 --o bind1
bind1 --as--o v6