query-c56ecb24af72cdb35c075e5935678082
title:Swedish municipals regarding nr outdoor gyms per number employed SELECT ?adminItem ?adminItemLabel (count(?item) as ?nr) ?employed (10000*?nr/?employed AS ?per1000employeed) WHERE { ?item wdt:P6104 wd:Q107186275; wdt:P131 ?adminItem. OPTIONAL {?adminItem wdt:P1128 ?employed} ?adminItem wdt:P17 wd:Q34 SERVICE wikibase:label { bd:serviceParam wikibase:language "sv,en". } } group by ?adminItem ?adminItemLabel ?pop ?employed order by desc(?per1000employeed)
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 bd: <http://www.bigdata.com/rdf#>
#title:Swedish municipals regarding nr outdoor gyms per number employed
SELECT ?adminItem ?adminItemLabel (count(?item) as ?nr) ?employed (10000*?nr/?employed AS ?per1000employeed) WHERE {
?item wdt:P6104 wd:Q107186275;
wdt:P131 ?adminItem.
OPTIONAL {?adminItem wdt:P1128 ?employed}
?adminItem wdt:P17 wd:Q34
SERVICE wikibase:label { bd:serviceParam wikibase:language "sv,en". }
} group by ?adminItem ?adminItemLabel ?pop ?employed
order by desc(?per1000employeed)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?adminItem"):::projected
v4("?employed"):::projected
v2("?item"):::projected
v5("?nr"):::projected
v6("?per1000employeed")
c8(["bd:serviceParam"]):::iri
c10(["sv,en"]):::literal
c2(["wd:Q107186275"]):::iri
c6(["wd:Q34"]):::iri
v2 --"wdt:P6104"--> c2
v2 --"wdt:P131"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P1128".-> v4
end
v3 --"wdt:P17"--> c6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
bind1[/"count(?item)"/]
v2 --o bind1
bind1 --as--o v5
bind2[/"'10000^^xsd:integer' * ?nr / ?employed"/]
v5 --o bind2
v4 --o bind2
bind2 --as--o v6