query-6dbb60e79514db597fca01b899d3dbfb
Composers
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#>
PREFIX target: <http://www.wikidata.org/entity/Q9035>
SELECT
?musical_works
?composer ?composerLabel
(CONCAT("#composer/", SUBSTR(STR(?composer), 32)) AS ?composerUrl)
?composerDescription
?example_musical_work ?example_musical_workLabel
WHERE {
{
SELECT
(COUNT(?musical_work) AS ?musical_works)
?composer
(SAMPLE(?musical_work) AS ?example_musical_work)
WHERE {
?musical_work wdt:P86 ?composer ;
wdt:P407 target: .
}
GROUP BY ?composer
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?musical_works)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?composer"):::projected
v5("?composerUrl")
v4("?example_musical_work"):::projected
v2("?musical_work")
v4("?musical_works"):::projected
c3([http://www.wikidata.org/entity/Q9035]):::iri
c5(["bd:serviceParam"]):::iri
c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"wdt:P86"--> v3
v2 --"wdt:P407"--> c3
bind2[/"count(?musical_work)"/]
v2 --o bind2
bind2 --as--o v4
bind3[/"sample(?musical_work)"/]
v2 --o bind3
bind3 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end
bind4[/"concat('#composer/',substring(str(?composer),'32^^xsd:integer'))"/]
v3 --o bind4
bind4 --as--o v5