query-715c2f02dfe105d1860feaa1e4d79704
as a BubbleChart
Use at
- https://query.wikidata.org/sparql
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
#defaultView:BubbleChart
#title:Nr views of Outdoor gyms videos in Sweden per producer
SELECT ?producer
(sum(?nrviews) AS ?nrViewsTotal) WHERE {
?item wdt:P6104 wd:Q107186275;
wdt:P17 wd:Q34.
{
?item p:P1651 ?Pyoutubev.
?Pyoutubev ps:P1651 ?youtubev.
OPTIONAL { ?Pyoutubev pq:P407 ?language. }
OPTIONAL { ?Pyoutubev pq:P5436 ?nrviews. }
?Pyoutubev pq:P2397 ?channel.
?producerWD wdt:P2397 ?channel.
OPTIONAL {
?producerWD rdfs:label ?producer.
FILTER((LANG(?producer)) = "sv")
}
OPTIONAL { ?producerWD wdt:P856 ?www. }
OPTIONAL { ?producerWD wdt:P1581 ?www. }
}
}
GROUP BY ?channel ?producer ?www
ORDER BY DESC (?nrViewsTotal)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?Pyoutubev")
v8("?channel")
v2("?item")
v6("?language")
v11("?nrViewsTotal")
v7("?nrviews"):::projected
v3("?producer"):::projected
v9("?producerWD")
v10("?www")
v5("?youtubev")
c4(["wd:Q34"]):::iri
c2(["wd:Q107186275"]):::iri
v2 --"p:direct/P6104"--> c2
v2 --"p:direct/P17"--> c4
v2 --"p:P1651"--> v4
v4 --"p:statement/P1651"--> v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P407".-> v6
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P5436".-> v7
end
v4 --"p:qualifier/P2397"--> v8
v9 --"p:direct/P2397"--> v8
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v9 -."rdfs:label".-> v3
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v9 -."p:direct/P856".-> v10
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v9 -."p:direct/P1581".-> v10
end
bind1[/"sum(?nrviews)"/]
v7 --o bind1
bind1 --as--o v11