query-00360e9ca867c1f54bb218370b404923
Organizational roles
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX target: <http://www.wikidata.org/entity/Q6053150>
SELECT
?persons
(CONCAT("#scientificeventseries/", SUBSTR(STR(target:), 32), "/organizationalrole/", SUBSTR(STR(?role), 32)) AS ?personsUrl)
?role ?roleLabel
?example_person ?example_personLabel
(CONCAT("#author/", SUBSTR(STR(?example_person), 32)) AS ?example_personUrl)
WHERE {
{
SELECT
(COUNT(?person) AS ?persons)
?role
(SAMPLE(?person) AS ?example_person)
WHERE {
?event wdt:P179 target: ;
p:P664 ?organizer_statement .
?organizer_statement ps:P664 ?person ;
pq:P3831 ?role .
}
GROUP BY ?role
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?persons)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?event")
v6("?example_person"):::projected
v8("?example_personUrl")
v3("?organizer_statement")
v4("?person")
v6("?persons"):::projected
v7("?personsUrl")
v5("?role"):::projected
c7(["bd:serviceParam"]):::iri
c2([http://www.wikidata.org/entity/Q6053150]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"p:direct/P179"--> c2
v2 --"p:P664"--> v3
v3 --"p:statement/P664"--> v4
v3 --"p:qualifier/P3831"--> v5
bind2[/"count(?person)"/]
v4 --o bind2
bind2 --as--o v6
bind3[/"sample(?person)"/]
v4 --o bind3
bind3 --as--o v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind4[/"concat('#scientificeventseries/',substring(str(http://www.wikidata.org/entity/Q6053150),'32^^xsd:integer'),'/organizationalrole/',substring(str(?role),'32^^xsd:integer'))"/]
v5 --o bind4
bind4 --as--o v7
bind5[/"concat('#author/',substring(str(?example_person),'32^^xsd:integer'))"/]
v6 --o bind5
bind5 --as--o v8