Skip to content

Commit

Permalink
Totals per municipality
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Feb 25, 2015
1 parent c328410 commit d3368db
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions municipality-totals.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Totals per municipality

PREFIX qb: <http://purl.org/linked-data/cube#>
PREFIX cedar: <http://bit.ly/cedar#>
PREFIX sdmx-dimension: <http://purl.org/linked-data/sdmx/2009/dimension#>
PREFIX sdmx-code: <http://purl.org/linked-data/sdmx/2009/code#>

SELECT ?municipality (SUM(?pop) AS ?tot)
FROM <urn:graph:cedar-mini:release>
WHERE { ?obs a qb:Observation .
?obs cedar:population ?pop .
?obs sdmx-dimension:sex sdmx-code:sex-M .
?obs sdmx-dimension:refArea ?municipality .
?obs cedar:residenceStatus <http://bit.ly/cedar-residenceStatus#TijdelijkAanwezig> .
?slice a qb:Slice.
?slice qb:observation ?obs.
?slice sdmx-dimension:refPeriod 1879 .
FILTER (NOT EXISTS {?obs cedar:houseType ?house }) .
FILTER (NOT EXISTS {?obs cedar:isTotal ?total }) .
FILTER (regex(?obs, "VT_1879_01_H1-S0", "i"))
} GROUP BY ?municipality

0 comments on commit d3368db

Please sign in to comment.