query-95533db141843228583736603e417847
Sponsors
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
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
?events
?sponsor ?sponsorLabel
(CONCAT("#sponsor/", SUBSTR(STR(?sponsor), 32)) AS ?sponsorUrl)
?roles
?example_event ?example_eventLabel
(CONCAT("#scientificevent/", SUBSTR(STR(?example_event), 32)) AS ?example_eventUrl)
WHERE {
{
SELECT
(COUNT(?event) AS ?events)
?sponsor
(GROUP_CONCAT(?role; separator=", ") AS ?roles)
(SAMPLE(?event) AS ?example_event)
WHERE {
?event wdt:P179 target: ;
p:P859 | p:P8324 ?sponsor_statement .
?sponsor_statement ps:P859 | ps:8324 ?sponsor .
OPTIONAL {
?sponsor_statement pq:P3831 / rdfs:label ?role .
FILTER (LANG(?role) = "en")
}
}
GROUP BY ?sponsor
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?events)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?event")
v6("?events"):::projected
v7("?example_event"):::projected
v9("?example_eventUrl")
v2("?role")
v6("?roles"):::projected
v5("?sponsor"):::projected
v8("?sponsorUrl")
v4("?sponsor_statement")
a1((" "))
c11(["bd:serviceParam"]):::iri
c3([http://www.wikidata.org/entity/Q6053150]):::iri
c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v3 --"p:direct/P179"--> c3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v3 --"p:P8324"--> v4
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v3 --"p:P859"--> v4
end
union0r <== or ==> union0l
end
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v4 --"p:statement/8324"--> v5
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v4 --"p:statement/P859"--> v5
end
union1r <== or ==> union1l
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P3831".-> a1
a1 --"rdfs:label"--> v2
end
bind3[/"count(?event)"/]
v3 --o bind3
bind3 --as--o v6
bind4[/"?role"/]
v2 --o bind4
bind4 --as--o v6
bind5[/"sample(?event)"/]
v3 --o bind5
bind5 --as--o v7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end
bind6[/"concat('#sponsor/',substring(str(?sponsor),'32^^xsd:integer'))"/]
v5 --o bind6
bind6 --as--o v8
bind7[/"concat('#scientificevent/',substring(str(?example_event),'32^^xsd:integer'))"/]
v7 --o bind7
bind7 --as--o v9