Skip to content

Commit

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

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 ?year (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 ?year .
FILTER (NOT EXISTS {?obs cedar:houseType ?house }) .
FILTER (NOT EXISTS {?obs cedar:isTotal ?total }) .
FILTER (?year IN (1879, 1889)) .
FILTER (regex(?obs, "VT_1879_01_H1-S0|VT_1889_03_H1-S0", "i")) .
} GROUP BY ?municipality ?year


0 comments on commit 56ea088

Please sign in to comment.